home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / gapqbdr.zip / GAPQBDR.TXT < prev    next >
Text File  |  1990-07-09  |  123KB  |  3,075 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                        GAPQBDR
  26.  
  27.  
  28.                        Door Interface Module - October 1, 1989
  29.  
  30.            A Professional Development Kit For The Professional Programmer
  31.  
  32.  
  33.  
  34.                 (C) Copyright 1988, 1989 The GAP Development Company
  35.  
  36.                                  ALL RIGHTS RESERVED
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.                                   TABLE OF CONTENTS
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.                                                                   Page
  51.  
  52.                DESCRIPTION                                           2
  53.                GETTING STARTED                                       3
  54.                COMPILING AND LINKING                                 8
  55.                SYSOP SETUP AND FUNCTIONS                             9
  56.                GLOBAL VARIABLES                                     12
  57.                    CONSTANTS                                        12
  58.                    ANSI CONSTANTS                                   12
  59.                    DOOR.SYS VARIABLES                               13
  60.                        INTEGERS                                     13
  61.                        LONGS                                        13
  62.                        STRINGS                                      13
  63.                    GAPQBDR GLOBALS                                  14
  64.                        INTEGERS                                     14
  65.                        LONGS                                        14
  66.                        STRINGS                                      14
  67.                    GAPDOS.DAT VARIABLES                             14
  68.                    USERS.DAT VARIABLES                              15
  69.                    PCBOARD.SYS VARIABLES                            16
  70.                    PCB USERS VARIABLES                              16
  71.                GLOBAL VARIABLES - ALPHABETICALLY By Type            18
  72.                    CONSTANTS                                        18
  73.                    INTEGERS                                         18
  74.                    LONGS                                            19
  75.                    STRINGS                                          19
  76.                FUNCTIONS AND SUBROUTINES - QUICK REFERENCE          22
  77.                FUNCTIONS AND SUBROUTINES - REFERENCE                23
  78.                GAPQBDR LICENSE AGREEMENT                            43
  79.                REGISTRATION INFORMATION                             44
  80.                GAPQBDR REGISTRATION                                 45
  81.                INDEX                                                46
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.                                      DESCRIPTION
  89.                                      -----------
  90.  
  91.           GAPQBDR is a professional development kit for Bulletin Board Door
  92.           programmers.   It can  also be  used to facilitate the writing of
  93.           stand alone  communications programs.   Written entirely in Quick
  94.           Basic (with  a little help from some Assembler support routines),
  95.           it is  fast, reliable,  easy to use, and easy to incorporate into
  96.           the serious programmer's source code.
  97.  
  98.           Features Include :
  99.  
  100.             o  Interfaces with GAP Communications and pcboard.
  101.             o  Complete interrupt driven communications which does not
  102.                require a DTR patched BRUNxx.EXE run time library.
  103.             o  Supports the FIFO buffers of the 16550 UART.
  104.             o  Speeds to 38.4k baud.
  105.             o  Supports all communications ports.
  106.             o  Supports CTS checking, even at 300 bps, for error free
  107.                transmissions.
  108.             o  Does not require watchdog or CTTY.
  109.             o  Uses ANSI colors instead of Basic's color statements so the
  110.                sysop sees what the caller sees.
  111.             o  Maintains a scoreboard of the top 10 players.
  112.             o  High speed text file display.
  113.             o  Supports ANSI color and ASCII text files with no programming
  114.                effort other than to make a single subroutine call.
  115.             o  Easy to use Random Number Generator.
  116.             o  Informative Status Line display.
  117.             o  Monitors keyboard activity and caller time remaining.
  118.             o  Easy interfacing to BBS system and user files.
  119.             o  Sysop chat with full word wrapping.
  120.             o  Allows the sysop to shell to DOS.
  121.             o  "Remembers" the default drive and directory which prevents
  122.                file access errors.
  123.             o  Credits caller with time spent chatting or while sysop is in
  124.                a DOS shell.
  125.             o  Sysop can twit caller without caller ever knowing the sysop
  126.                is watching.
  127.             o  Caller time can be increased or decreased.
  128.             o  Full programmer control of whether or not to update the BBS
  129.                system files.
  130.             o  Time calculations are not dependent on the "seconds since
  131.                midnight" and are thus unsusceptible to the midnight roll
  132.                over.
  133.             o  Timer routines are hardware independent.
  134.             o  Allows the sysop to override the "more" prompt during file
  135.                shows.
  136.             o  Allows the sysop to "force" a file display.
  137.             o  Automatic detection of multi-user system.
  138.             o  Input routines are consistent throughout the program.
  139.             o  Uses the latest in Quick Basic features.
  140.             o  Extremely easy interfacing to door programs.
  141.  
  142.  
  143.  
  144.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  145.  
  146.  
  147.                                    GETTING STARTED
  148.                                    ---------------
  149.  
  150.           GAPQBDR is distributed in archived format.  The contents of the
  151.           archive should be as follows:
  152.  
  153.                GAPQBDR.TXT    -    This documentation.
  154.                GAPQBDR.QLB    -    Library routines for QB environment.
  155.                GAPQBDR.LIB    -    Standard Library routines for BC.
  156.                GAPQBDR.BI     -    Door Interface include file.
  157.                DOOR.ZIP       -    Sample program illustrating many of
  158.                                    the features of GAPQBDR.
  159.                READ.ME        -    Any pertinent information which you
  160.                                    should read.
  161.  
  162.  
  163.           If you licensed the source code to GAPQBDR, the following files
  164.           are included in an archive called GAPQBSRC:
  165.  
  166.                ACCESS.BAS     -    Basic source for file access.
  167.                CARRIER.BAS    -    Basic source for no carrier routines.
  168.                DOCHAT.BAS     -    Basic source for sysop chat.
  169.                GAPDOS.BAS     -    Basic source to read/write GAPDOS.DAT.
  170.                GAPQBDR.BAS    -    Basic source for main GAPQBDR functions.
  171.                GAPUSER.BAS    -    Basic source to read/write GAP USERS.
  172.                GETRAND.BAS    -    Basic source for random number routines.
  173.                INITDOOR.BAS   -    Basic source for door initialization.
  174.                LEAVE.BAS      -    Basic source for closing the door.
  175.                PCBSYS.BAS     -    Basic source to read/write PCBOARD.SYS.
  176.                PCBUSER.BAS    -    Basic source to read/write PCB USERS.
  177.                PUTCHAR.BAS    -    Basic source for character output.
  178.                SCOREBRD.BAS   -    Basic source for scoreboard routines.
  179.                SHOWFILE.BAS   -    Basic source for file display.
  180.                STATUS.BAS     -    Basic source for the status line.
  181.                SYSPAGE.BAS    -    Basic source for page sysop routines.
  182.                TIMCRED.BAS    -    Basic source for time credits.
  183.                WAIT.BAS       -    Basic source for time pauses.
  184.                ATSAY.ASM      -    Assembler source for screen positioning.
  185.                CLS.ASM        -    Assembler source for clear screen.
  186.                CTRLC.ASM      -    Assembler source for CTRL-C handler.
  187.                CURSOR.ASM     -    Assembler code for cursor positioning.
  188.                DOSPRINT.ASM   -    Assembler source for BIOS string output.
  189.                GAPPUTS.ASM    -    Assembler source for string output.
  190.                GETKEYC.ASM    -    Assembler source for keyboard input.
  191.                KEYBRD.ASM     -    Assembler source for keyboard function.
  192.                GAPQBSRC.BI    -    Global declarations for source files.
  193.                MAKELIBS.BAT   -    Batch file for compiling the source
  194.                                    modules and creating libraries.
  195.                LIBLIB         -    LIB response file.
  196.                QLBQLB         -    Linker response file.
  197.                SRCREAD.ME     -    Any pertinent information which you
  198.                                    should read.
  199.  
  200.  
  201.  
  202.  
  203.  
  204.                                        Page 3
  205.  
  206.  
  207.  
  208.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  209.  
  210.  
  211.           In addition,  all the  object modules  for  the  private  GAPQBDR
  212.           functions are  provided so that you may create the quick library.
  213.           You will  also need  the file QB.BI which is distributed with the
  214.           Microsoft QB  disks. A DTR patched BRUN45.EXE is not needed since
  215.           GAPQBDR uses its own communications routines.
  216.  
  217.           Place the  files in your QB work directory.  Make sure that QB.BI
  218.           is accessible  to the compiler. The source files should be placed
  219.           in a directory called SOURCE (off of your QB directory).
  220.  
  221.           Throughout this  document, the terms function, routine, procedure
  222.           and subroutine  are used  interchangeably.   However,  pay  close
  223.           attention to  the return  value and  the  examples.    In  QB,  a
  224.           function returns a value, where as a sub program does not.
  225.  
  226.           If you  use an external editor to write your programs, the editor
  227.           must allow  control characters  to be entered and displayed.  The
  228.           ANSI constants  are initialized by literal characters and if your
  229.           editor removes  the ESC  character from  the constants, your ANSI
  230.           displays will be quite messy.
  231.  
  232.           If you  are using  the QB  environment, you will need to load the
  233.           door module  along with  your source program.  To do so, type the
  234.           following :
  235.  
  236.                QB door /L GAPQBDR
  237.  
  238.                (where door is the name of your basic source program)
  239.  
  240.           If you  fail to  load the  quick library along with your program,
  241.           you will  receive a  great many  "subprogram not  defined" errors
  242.           when you try to compile or run your program.
  243.  
  244.           We are a firm supporter of declaring all variables prior to their
  245.           use.   Not only  does it  make your  programs easier to debug, it
  246.           makes them  easier   to read   and follow.  We recommend that you
  247.           follow our guidelines and declare all of your global variables at
  248.           the beginning of your program, after including GAPQBDR.BI.
  249.  
  250.           At the  very beginning  of your  program, you  must  include  the
  251.           GAPQBDR.BI file.   Without this file, nothing will work.  It must
  252.           be the first directive in your source file.  To include the file,
  253.           you type the following at the beginning of your source program:
  254.  
  255.                '$INCLUDE: 'GAPQBDR.BI'
  256.  
  257.           Do not under any circumstances use the DEF type statements (I.E.,
  258.           DEFINT A-Z).   This  is the  lazy persons  method of programming.
  259.           Typedef your variables by either declaring them ahead of time, or
  260.           by appending the type after the name (i.e., A$, I%).
  261.  
  262.           If you  need to use your own On Error routines, you should modify
  263.           the supplied  error handler  rather  than  simply  ignore  it  or
  264.  
  265.  
  266.  
  267.  
  268.                                        Page 4
  269.  
  270.  
  271.  
  272.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  273.  
  274.  
  275.           replace it. If you subsequently change the Error Trap address, it
  276.           is your responsibility to deal with any run time errors.
  277.  
  278.           After declaring any variables and functions, you must include the
  279.           error handling file. The error handler is included in your source
  280.           module so  that it  can be globally accessible by all routines in
  281.           the GAPQBDR  library. To  include the  file, type  the  following
  282.           immediately AFTER  declaring your global variables and BEFORE any
  283.           executable statements:
  284.  
  285.                '$INCLUDE: 'GAPQBERR.BI'
  286.  
  287.           It is  important that  the error handling file be inserted at the
  288.           proper place in your program. The file may not be included before
  289.           your variable  declarations and it MUST be included prior to your
  290.           first executable  statement. Please see the example program for a
  291.           sample of  how to  include this  file. Remember  that a  variable
  292.           assignment is not a variable declaration but an actual executable
  293.           statement.
  294.  
  295.           You are  now ready to begin your program.  You may now initialize
  296.           your variables and start your program.
  297.  
  298.           The first  thing that must be done prior to using any of the door
  299.           functions, is  to initialize  GAPQBDR itself.   This  is done  by
  300.           making a call to read.cnf.  Read.cnf opens the configuration file
  301.           (the name  of which  you pass as a parameter) and reads the first
  302.           three lines  of the  file.   If the  configuration file cannot be
  303.           found, the  program will  end.   The format  of the configuration
  304.           file is as follows:
  305.  
  306.           -----------------------------------------
  307.           c:\gap
  308.           The Crow's Nest
  309.           0
  310.  
  311.           The first  line of  the file  is the  path  to  the  BBS  default
  312.           directory.   The second  line is  the name  of the BBS. The third
  313.           line is  a flag  that tells GAPQBDR if the host BBS system is GAP
  314.           or PCB.  For GAP,  set this  line to 0. For PCB, set it to 1. The
  315.           configuration file is usually given a name similar to the name of
  316.           your door  program, with  a CNF  extension.   Read.cnf will leave
  317.           this file  open for  your use.   If  you have  any  configuration
  318.           options of  your own,  you may  place them in this file beginning
  319.           with line  4.  Do not read your configuration options until after
  320.           making a  call to  init.door (which should be the second function
  321.           call in  your program).  Upon return from init.door, you are free
  322.           to read  your configuration  options (if any).  At this time, you
  323.           should close the configuration file.  Its file number is #1.
  324.  
  325.           Normally, your  program is  invoked with a command line parameter
  326.           giving the name of the configuration file to use:
  327.  
  328.                (I.E., DOOR DOOR.CNF).
  329.  
  330.  
  331.  
  332.                                        Page 5
  333.  
  334.  
  335.  
  336.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  337.  
  338.  
  339.           You would  use the COMMAND$ function to extract the configuration
  340.           parameter and  then pass  this parameter  on to  read.cnf.   This
  341.           allows the  end user  to use a single program (your program) with
  342.           multiple configuration files.  This is especially important under
  343.           multi-user systems where separate configuration files are needed.
  344.  
  345.           The configuration  file is  opened as  a sequential file so using
  346.           Line Input #1 would be appropriate for reading any data.
  347.  
  348.           If there were no errors, read.cnf will return.  You must now make
  349.           a call to init.door.  Init.door uses the information derived from
  350.           line 1  of the configuration file to open and read DOOR.SYS (GAP)
  351.           or PCBOARD.SYS (PCB)  as well  as the BBS configuration file.  In
  352.           addition, init.door  opens the  communications port (if  a remote
  353.           user is  on), initializes  some global variables, initializes the
  354.           random  number  generator,  and  installs  the  CTRL-C  interrupt
  355.           handler. If  there  is  an  error,  init.door  will  not  return.
  356.           Instead it will end the program.
  357.  
  358.           That is  basically all  you have  to do to initialize the GAPQBDR
  359.           module.   When your  program ends,  you  should  clean  house  if
  360.           necessary and  call leave.   Leave closes the communications port
  361.           and any  open files,  sends a sign off message to the caller, and
  362.           then exits to DOS.
  363.  
  364.           Things to remember:
  365.  
  366.             To get  the ball  rolling,  include  GAPQBDR.BI  as  the  first
  367.             directive in your source program.
  368.  
  369.             Include GAPQBERR.BI  after declaring  any global  variables and
  370.             prior to your first executable statement.
  371.  
  372.             To initialize  the door,  call read.cnf  with the  name of your
  373.             programs configuration file.  Call init.door.
  374.  
  375.             Call leave when your program is finished.
  376.  
  377.             With the  exception of  file #1  which  is  used  to  read  the
  378.             configuration file  and which  YOU should  close, there  are no
  379.             other files  left open.  GAPQBDR uses good programming practice
  380.             by asking  Basic for  a file  number rather  than telling Basic
  381.             which number to use.
  382.  
  383.             All input  and output  should be  performed through the GAPQBDR
  384.             functions.   The sample  program gives  good examples on how to
  385.             accomplish this.
  386.  
  387.             To determine if the BBS is a single or multi user system, check
  388.             the variable called node.  If it is anything other than 0, then
  389.             the BBS is multi-user and you should read/write your data files
  390.             with sharing attributes.
  391.  
  392.  
  393.  
  394.  
  395.  
  396.                                        Page 6
  397.  
  398.  
  399.  
  400.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  401.  
  402.  
  403.             The default mode of operation is GAP mode.  This means that you
  404.             should not  use those  functions which  access PCB  files.   To
  405.             determine if  the BBS  is a  PCB  system,  check  the  variable
  406.             do.pcb. If this is set to 1, then the BBS is PCB and you should
  407.             not access  GAP files.  The variable do.pcb is set to 1 if line
  408.             3 of the door configuration file is set to 1.
  409.  
  410.  
  411.           To test  your program,  you  will  need  a  DOOR.SYS (GAP)  or  a
  412.           PCBOARD.SYS (PCB) file  that was  written for  local  exit.    Of
  413.           course, you  can always  modify any  DOOR.SYS file and change the
  414.           first line  so that  it reads COM0:.  In addition, for a GAP BBS,
  415.           the  GAPBBS.CNF   file  must   be   accessible   (PCBOARD.DAT and
  416.           USERS for PCB).   A complete set of sample files are provided for
  417.           testing your program under local mode.  Experience has shown that
  418.           although  the  QB  environment  editor  makes  for  a  cumbersome
  419.           programmers editor,  testing programs  inside QB  is perhaps  the
  420.           easiest and  most efficient  way to  test.   The  environment  is
  421.           wonderful for  catching syntax  errors and even more fantastic at
  422.           allowing the  programmer to  correct those errors and continue to
  423.           run the program.
  424.  
  425.           Do not  use any  of the  Basic input/output or screen positioning
  426.           functions. If  you do,  you will  find that  if  you  attempt  to
  427.           "print" a  string, the string will not appear on the screen where
  428.           you might  think it  should. This  is because Basic maintains its
  429.           own  cursor   location,  and   GAPQBDR  does   NOT  update   this
  430.           information.  All   input/output  should  take  place  using  the
  431.           functions provided  by GAPQBDR.  Not only are they more efficient
  432.           than Basics, they are faster as well!
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                                        Page 7
  461.  
  462.  
  463.  
  464.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  465.  
  466.  
  467.                                 COMPILING AND LINKING
  468.                                 ---------------------
  469.  
  470.           GAPQBDR has already been compiled with the necessary compile time
  471.           switches.
  472.  
  473.           To compile  your programs,  use whatever switches are required by
  474.           your program  along with the /x (on error) switch which is needed
  475.           for the error handling routine. Use the following commands:
  476.  
  477.                bc /x doorname;
  478.                link doorname,,NUL.MAP,+gapqbdr
  479.  
  480.                Where doorname is the name of your program.
  481.  
  482.  
  483.           WARNING: Do  NOT, under  any circumstance,  use the  /mbf compile
  484.                    time  switch.    GAPQBDR  expects  all  of  its  numeric
  485.                    variables to  be in  IEEE format.  If you have a need to
  486.                    manipulate a  PCB data  file (which  contains MBF format
  487.                    numbers), declare  the MBF  fields as  strings  and  use
  488.                    either CVSMBF or CVDMBF to convert the strings. You will
  489.                    see an  example of  this in the record structure for the
  490.                    PCB USERS  file.   The fields  downbytes and upbytes are
  491.                    actually  DOUBLES.  The  field  lastmsg  is  actually  a
  492.                    SINGLE.   To convert downbytes you can use : downbytes =
  493.                    CVDMBF(pcbuser.downbytes). If  you update  this field in
  494.                    the  PCB  USERS  file,  you  can  save  it  by  using  :
  495.                    pcbuser.downbytes = MKDMBF$(downbytes).
  496.  
  497.                    The Microsoft  Binary format for numbers should never be
  498.                    used. Support for the MBF format will no doubt disappear
  499.                    in future  versions of  QB.   You should  ALWAYS use the
  500.                    latest versions and features of your compiler.
  501.  
  502.                    IEEE Format  numbers provide  for greater  accuracy  and
  503.                    wider ranges.  They are compatible with assembler and C.
  504.                    They also allow you to use a math coprocessor, if one is
  505.                    available.
  506.  
  507.                    You should  also use  LONG INTEGERS instead of SINGLE or
  508.                    DOUBLE  precision  numbers  where  appropriate.  A  long
  509.                    integer can  represent a number as great as 2.1 billion!
  510.                    This should  more than  cover your  needs.    Especially
  511.                    since a BBS (door) program rarely uses or has a need for
  512.                    real numbers.
  513.  
  514.                    If you  are converting an old door program that uses MBF
  515.                    format numbers  in random access files, you will need to
  516.                    use either  the  QB  supplied  conversion  functions  or
  517.                    convert your  random access  data files  to the new user
  518.                    defined binary type record structures.
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                        Page 8
  525.  
  526.  
  527.  
  528.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  529.  
  530.  
  531.                               SYSOP SETUP AND FUNCTIONS
  532.                               -------------------------
  533.  
  534.           These sysop  setup and  function descriptions should be placed in
  535.           the documentation  of your  door program.   You should, of course
  536.           change the setup information to fit your particular needs.
  537.  
  538.  
  539.  
  540.           Door programs written with the GAPQBDR Door Interface Module will
  541.           run on  GAP Communications  version 4  and  greater  and  on  PCB
  542.           version 14 and greater.
  543.  
  544.           To configure the door for a particular BBS setup, a configuration
  545.           file must  be used.   At the very minimum, this file will contain
  546.           three lines.   It  may contain  more than three, depending upon a
  547.           particular doors  configuration requirements.   The  name of  the
  548.           file is  usually the  same as that of the door program but with a
  549.           CNF extension.   The  minimum requirements  for the  file are  as
  550.           follows:
  551.  
  552.                c:\gap
  553.                The Crow's Nest
  554.                0
  555.  
  556.                The first  line  is  the  full  path  to  your  BBS  default
  557.                directory.   For GAP, this is usually C:\GAP.  For PCB, this
  558.                is usually C:\PCB.  The second line is the name of your BBS.
  559.                The third  line is a flag that tells GAPQBDR what BBS system
  560.                it is running under. A 0 means GAP, and a 1 means PCB.
  561.  
  562.           GAPQBDR will  obtain the  sysop's name from the BBS configuration
  563.           file.
  564.  
  565.           You must  now create a batch file to invoke the door.  This batch
  566.           file is  placed in your BBS default directory.  Such a batch file
  567.           might look like this:
  568.  
  569.                echo off
  570.                cd \gap\doors\tl
  571.                tl tl.cfg
  572.                cd \gap
  573.                gap
  574.  
  575.           As you  can see, the door is invoked by passing the configuration
  576.           file name as a parameter.
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.                                        Page 9
  589.  
  590.  
  591.  
  592.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  593.  
  594.  
  595.           You will  also need  to modify your doors menu files and the data
  596.           file that  tells the  BBS what  your doors  are and  the security
  597.           level needed to access them.  For GAP, these are respectively:
  598.  
  599.                DOORM
  600.                DOORMG
  601.                DOORS.DAT
  602.  
  603.           Please refer  to your  BBS documentation  for details on  setting
  604.           these files up.
  605.  
  606.           If you  are running  multi-nodes, simply  create a  separate door
  607.           configuration file for each node, and number them.  For instance,
  608.           for a  3 node  system, you might have the following configuration
  609.           files:
  610.  
  611.                TL1.CFG
  612.                TL2.CFG
  613.                TL3.CFG
  614.  
  615.           The only difference between the three would be the 1st line which
  616.           points to the default directory for the particular node.
  617.  
  618.           Multi-user operation  is automatic.   For  GAP, the  presence  of
  619.           DUMMYLOK.DAT in the MAIN directory triggers multi-user operation.
  620.           For PCB, this information is derived from the PCBOARD.DAT file.
  621.  
  622.           The following  files are  read during  door initialization.  They
  623.           must be present or the door will not operate.
  624.  
  625.                GAP                      PCB
  626.                ----------------         ----------------
  627.                DOOR.SYS                 PCBOARD.SYS
  628.                GAPBBS.CNF               PCBOARD.DAT
  629.                                         USERS
  630.  
  631.           In addition,  a particular  door may access the GAP USERS.DAT and
  632.           GAPDOS.DAT files.
  633.  
  634.  
  635.           The following sysop functions are available while awaiting
  636.           keyboard input :
  637.  
  638.                    F5     -  Shell to DOS.
  639.                    F8     -  Twit user and return to BBS.
  640.                   F10     -  Initiate chat with user.
  641.                   CF10    -  Answer user page bell.
  642.                   Home    -  Main user stats.
  643.                   End     -  Displays sysop keys available.
  644.                   PgDn    -  Secondary user stats.
  645.                 Up Arrow  -  Increase user's time remaining.
  646.                 Dn Arrow  -  Decrease user's time remaining.
  647.  
  648.  
  649.  
  650.  
  651.  
  652.                                        Page 10
  653.  
  654.  
  655.  
  656.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  657.  
  658.  
  659.           One of  the nicer  features about using the TWIT key, is the user
  660.           is not  told that  "the sysop  wants them  to return to the BBS".
  661.           Instead, a very plain and simple message of "returning you to the
  662.           BBS" is  displayed.   This way,  the user  is given no indication
  663.           that the sysop is hovering about.
  664.  
  665.           When using  the F5  shell to  DOS key,  to  return  to  the  door
  666.           program, simply  type EXIT  at the DOS command prompt.  It is not
  667.           necessary to  change directories  back  to  the  door  directory.
  668.           GAPQBDR is  smart enough  to know  which drive  and directory the
  669.           door program  is in and  will reset the defaults upon return from
  670.           DOS.
  671.  
  672.           The Up  and Down Arrow keys increase and decrease the user's time
  673.           respectively by  5 minutes for each press of the key. There is no
  674.           indication of  what is  occurring (except  by the fact the user's
  675.           time remaining  will change), so the sysop should try not to have
  676.           a lead  finger.  The increase or decrease is effective only while
  677.           the user  is in  the door.   Since we are firm believers that the
  678.           BBS system  files belong  to the BBS and should not be altered by
  679.           any door  program, updating the BBS system file is NOT automatic.
  680.           If you  wish that  any decrease or increase in the user's time be
  681.           made permanent,  you may,  after initializing  the door, call the
  682.           function that  opens the  system file.   Keep  track of  any time
  683.           credits  during  the  door  programs  operation,  then  call  the
  684.           function that updates the BBS system file.  Examples of how to do
  685.           this are included in the sample program.
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.                                        Page 11
  717.  
  718.  
  719.  
  720.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  721.  
  722.  
  723.                                   GLOBAL VARIABLES
  724.                                   ----------------
  725.  
  726.           All global variables (except for constants) are defined as COMMON
  727.           SHARED.   They are included in your program by including the file
  728.           GAPQBDR.BI at the top of your source file.
  729.  
  730.  
  731.           CONSTANTS
  732.           ---------
  733.  
  734.           Constants are defined as - CONST name = constant value.
  735.  
  736.           NO                  Defined as 0
  737.           YES                 Defined as 1
  738.  
  739.           ANSI CONSTANTS
  740.           --------------
  741.  
  742.           ANSI constants contain the actual ANSI color sequences.
  743.  
  744.           BLACK               ANSI codes for Black
  745.           BLUE                ANSI codes for Blue
  746.           BROWN               ANSI codes for Brown
  747.           CYAN                ANSI codes for Cyan
  748.           GREEN               ANSI codes for Green
  749.           MAGENTA             ANSI codes for Magenta
  750.           RED                 ANSI codes for Red
  751.           WHITE               ANSI codes for White
  752.  
  753.           BBLACK              ANSI codes for Grey
  754.           BBLUE               ANSI codes for bright Blue
  755.           BCYAN               ANSI codes for bright Cyan
  756.           BGREEN              ANSI codes for bright Green
  757.           BMAGENTA            ANSI codes for bright Magenta
  758.           BRED                ANSI codes for bright Red
  759.           BWHITE              ANSI codes for bright White
  760.           YELLOW              ANSI codes for Yellow
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.                                        Page 12
  781.  
  782.  
  783.  
  784.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  785.  
  786.  
  787.           DOOR.SYS VARIABLES
  788.           ------------------
  789.  
  790.           DOOR.SYS  variables   are  initialized  while  reading  the  Door
  791.           Interface Module,  DOOR.SYS. (For PCB, PCBOARD.DAT and USERS must
  792.           be read  to initialize  these  variables).  These  variables  are
  793.           available from door start up to door end.  The DOOR.SYS variables
  794.           are the door programmer's connection to the BBS.
  795.  
  796.  
  797.           INTEGERS
  798.           --------
  799.  
  800.           alarm               Caller Alarm. 0 = off, 1 = on
  801.           bell                Page Bell. 0 = off, 1 = on
  802.           c.olor              Color toggle. 0 = no color, 1 = color ok
  803.           expert              Expert mode. 0 = non-expert, 1 = expert
  804.           l.ocal              0 = remote user, 1 = local
  805.           level               User's security level
  806.           minsleft            Number of minutes user has left at door start
  807.           node                Node number. 0 = single user
  808.           page                User's page length
  809.           parity              Should actually be data bits and is not used
  810.           port                Communications port in use
  811.           printer             Printer Toggle. 0 = off, 1 = on
  812.           s.creen             Screen display. 0 = off, 1 = on
  813.  
  814.           LONGS
  815.           -----
  816.  
  817.           baud                DTE rate to open COMM port at
  818.           downbytes           Total bytes downloaded
  819.           downloads           Number of downloads
  820.           maxbytes            Maximum number of bytes allowed to download
  821.           recnum              User's record number in USER file
  822.           timeson             Number of times user has been on
  823.           upbytes             Total bytes uploaded
  824.           uploads             Number of uploads
  825.           userbaud            BPS rate of the remote user
  826.  
  827.           STRINGS
  828.           -------
  829.  
  830.           bphone              User's business or data phone number
  831.           city                User's home town
  832.           first               User's first name
  833.           hphone              User's home phone number
  834.           last                User's last name
  835.           lastdate            Last date user was on
  836.           password            User's password. PASSWORD if sysop is on
  837.           subscrip            Date user's subscription expires
  838.           username            User's full name
  839.  
  840.  
  841.  
  842.  
  843.  
  844.                                        Page 13
  845.  
  846.  
  847.  
  848.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  849.  
  850.  
  851.           GAPQBDR GLOBALS
  852.           --------------
  853.  
  854.           These variables are the documented, global variables (initialized
  855.           and used  by GAPQBDR).   They  may be modified and/or used at the
  856.           programmer's discretion.
  857.  
  858.  
  859.           INTEGERS
  860.           ---------
  861.  
  862.           do.pcb              If set to 1, the BBS is a PCB system
  863.           noup                If set to 1, get.string will not uppercase
  864.           timecredit          Time credits for user (in minutes)
  865.           timeleft            Time user has left (in minutes)
  866.  
  867.           LONGS
  868.           -----
  869.  
  870.           starttime           Time the user logged on (in seconds)
  871.           temptime            For calculating keyboard time out
  872.           timenow             Time it is now  (in seconds)
  873.  
  874.           STRINGS
  875.           -------
  876.  
  877.           anystring1          Global garbage collector
  878.           bbs.dir             Path to BBS default dir
  879.           birthday            Callers birth date
  880.           board.name          Name of the BBS
  881.           gendir              Path to the gen directory
  882.           maindir             Path to the main directory
  883.           sysname             Sysop's name
  884.  
  885.  
  886.           GAPDOS.DAT VARIABLES
  887.           --------------------
  888.  
  889.           These variables  are initialized  by the  programmer by  making a
  890.           call to read.gapdos.  Note that string variables are fixed length
  891.           and will  contain a NULL byte.  Please see the GAPQBDR.BI include
  892.           file for the actual definition of these variables.
  893.  
  894.  
  895.           gapdos.baud         DTE bps rate
  896.           gapdos.callbytes    Ttl bytes available for download
  897.           gapdos.didnew       1 = did a new files scan
  898.           gapdos.exitdos      1 = exit to DOS after call
  899.           gapdos.forumnum     Forum the user is in
  900.           gapdos.givetime     1 = event pending, else extra time received
  901.           gapdos.joined       Bit flags of forums joined
  902.           gapdos.localc       0 = user, 1 = sysop, 2 = local user
  903.           gapdos.minavail     Total minutes available to user
  904.           gapdos.port         Port being used
  905.  
  906.  
  907.  
  908.                                        Page 14
  909.  
  910.  
  911.  
  912.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  913.  
  914.  
  915.           gapdos.starttime    Time (in seconds) user logged on
  916.           gapdos.timecredit   Any time credits user may have
  917.           gapdos.userbaud     User's bps rate
  918.           gapdos.userfirst    User's first name
  919.           gapdos.userindex    User's index into user file
  920.           gapdos.username     User's full name
  921.  
  922.  
  923.           USERS.DAT VARIABLES
  924.           -------------------
  925.  
  926.           These variables  are initialized  by the  programmer by  making a
  927.           call to  read.gapuser.   Note that  string  variables  are  fixed
  928.           length and  will contain  a NULL byte.  Please see the GAPQBDR.BI
  929.           include file for the actual definition of these variables.
  930.  
  931.           WARNING : STRING fields are fully padded with spaces and the last
  932.           position of the string is and MUST be a 0!
  933.  
  934.           user.blts           Total bulletins read
  935.           user.bphone         User's work or data phone number
  936.           user.city           City, state, and zip (padded)
  937.           user.curbytes       Total bytes downloaded this call
  938.           user.curdown        Total files dowloaded today
  939.           user.doors          Total doors opened
  940.           user.downloads      Total downloads
  941.           user.expert         Novice = N, expert = Y
  942.           user.fname          User's first name (padded)
  943.           user.handle         User's handle (padded)
  944.           user.hphone         User's home phone number
  945.           user.joined         Total forums joined
  946.           user.lastdate       Last date on - mm/dd/yy
  947.           user.lastdir        Date last looked at a directory listing
  948.           user.lastfrm        Last forum in
  949.           user.lastmsg        Last message read
  950.           user.lasttime       Last time on - hh:mm
  951.           user.level          Security Level
  952.           user.lname          User's last name (padded)
  953.           user.mesleft        Total messages left
  954.           user.mesread        Total messages read
  955.           user.minutes        Total minutes last call
  956.           user.page           Page length
  957.           user.passwd         User's password (padded)
  958.           user.private        Allow on private nodes?
  959.           user.protocol       Transfer protocol (padded)
  960.           user.subscribe      Date user's subscription expires
  961.           user.sysop          Sysop record, 1 = Y, 0 = N
  962.           user.timeson        Number of times on
  963.           user.ttlbytes       Total bytes downloaded
  964.           user.ttlmins        Total mins on
  965.           user.upbytes        Total bytes uploaded
  966.           user.uploads        Total uploads
  967.  
  968.  
  969.  
  970.  
  971.  
  972.                                        Page 15
  973.  
  974.  
  975.  
  976.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  977.  
  978.  
  979.           PCBOARD.SYS VARIABLES
  980.           --------------------
  981.  
  982.           These variables are initialized automatically by init.door if the
  983.           BBS system is PCB.
  984.  
  985.  
  986.           pcbsys.baud         Com port bps rate
  987.           pcbsys.calleralarm  Caller alarm   -1=on,0=off
  988.           pcbsys.colorc       Color toggle   Y,N,7
  989.           pcbsys.ctime        Time user logged on as HH:MM
  990.           pcbsys.display      Display on/off -1=on,0=off
  991.           pcbsys.eactive      Event active   -1=yes,0=no
  992.           pcbsys.errcorrect   ECC modem      -1=yes,0=no
  993.           pcbsys.event        Event time as HH:MM
  994.           pcbsys.forumnum     Forum user was in  "0" = main
  995.           pcbsys.minsleft     Minutes left for caller
  996.           pcbsys.node         Node number as short integer
  997.           pcbsys.pagebell     Page bell      -1=on,0=off
  998.           pcbsys.password     User's password
  999.           pcbsys.port         Com port as "0","1", or "2"
  1000.           pcbsys.printer      Printer on/off -1=on,0=off
  1001.           pcbsys.sevent       Slide event    -1=yes,0=no
  1002.           pcbsys.sysopnext    Sysop on next  N,X,space
  1003.           pcbsys.timeallowed  Allowed time in minutes
  1004.           pcbsys.timecredit   Any time credits in minutes
  1005.           pcbsys.timegiven    Highest forum time given
  1006.           pcbsys.timeon       Time user logged on in minutes
  1007.           pcbsys.timeused     Time user has used that day
  1008.           pcbsys.ttlbytes     Total K bytes available
  1009.           pcbsys.userbaud     Caller bps rate (Local if local mode)
  1010.           pcbsys.userfirst    User's first name
  1011.           pcbsys.username     Name of caller
  1012.           pcbsys.userrec      User's record number
  1013.  
  1014.  
  1015.           PCB USERS VARIABLES
  1016.           -------------------
  1017.  
  1018.           These variables are initialized automatically by init.door if the
  1019.           BBS system  is PCB.   To  utilize downbytes, upbytes, and lastmsg
  1020.           you must use the QB Microsoft Binary Format conversion functions.
  1021.  
  1022.  
  1023.           pcbuser.bphone      User's work or data phone number
  1024.           pcbuser.city        City, state, and zip (padded)
  1025.           pcbuser.cnfregis    Forum registration
  1026.           pcbuser.delete      Delete, Y=yes,N=no
  1027.           pcbuser.downbytes   Total download bytes. Use CVDMBF
  1028.           pcbuser.downloads   Number of downloads
  1029.           pcbuser.expert      Expert mode Y=yes,N=no
  1030.           pcbuser.hphone      User's home phone
  1031.           pcbuser.lastconf    Last forum in
  1032.           pcbuser.lastdate    Last date user was on
  1033.  
  1034.  
  1035.  
  1036.                                        Page 16
  1037.  
  1038.  
  1039.  
  1040.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1041.  
  1042.  
  1043.           pcbuser.lastdir     Last New files scan
  1044.           pcbuser.lastime     Last time user was on
  1045.           pcbuser.lastmsg     Last message read in main. Use CVSMBF
  1046.           pcbuser.lastmsg1    Last message read in each forum
  1047.           pcbuser.level       User's level as short integer
  1048.           pcbuser.name        User's name
  1049.           pcbuser.page        Page length
  1050.           pcbuser.passwd      User's password
  1051.           pcbuser.protocol    Protocol type
  1052.           pcbuser.regisdate   Registration date
  1053.           pcbuser.timeson     Number of times on
  1054.           pcbuser.upbytes     Total upload bytes. Use CVDMBF
  1055.           pcbuser.uploads     Number of uploads
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.                                        Page 17
  1101.  
  1102.  
  1103.  
  1104.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1105.  
  1106.  
  1107.                       GLOBAL VARIABLES - ALPHABETICALLY By Type
  1108.                       -----------------------------------------
  1109.  
  1110.           CONSTANTS
  1111.           ---------
  1112.  
  1113.           BBLACK              ANSI codes for Grey
  1114.           BBLUE               ANSI codes for bright Blue
  1115.           BCYAN               ANSI codes for bright Cyan
  1116.           BGREEN              ANSI codes for bright Green
  1117.           BLACK               ANSI codes for Black
  1118.           BLUE                ANSI codes for Blue
  1119.           BMAGENTA            ANSI codes for bright Magenta
  1120.           BRED                ANSI codes for bright Red
  1121.           BROWN               ANSI codes for Brown
  1122.           BWHITE              ANSI codes for bright White
  1123.           CYAN                ANSI codes for Cyan
  1124.           GREEN               ANSI codes for Green
  1125.           MAGENTA             ANSI codes for Magenta
  1126.           NO                  Defined as 0
  1127.           RED                 ANSI codes for Red
  1128.           WHITE               ANSI codes for White
  1129.           YELLOW              ANSI codes for Yellow
  1130.           YES                 Defined as 1
  1131.  
  1132.           INTEGERS
  1133.           --------
  1134.  
  1135.           alarm               Caller Alarm. 0 = off, 1 = on
  1136.           bell                Page Bell. 0 = off, 1 = on
  1137.           c.olor              Color toggle. 0 = no color, 1 = color ok
  1138.           do.pcb              1 = This is a PCB system
  1139.           expert              Expert mode. 0 = non-expert, 1 = expert
  1140.           gapdos.baud         DTE bps rate
  1141.           gapdos.forumnum     Forum the user is in
  1142.           gapdos.givetime     1 = event pending, else extra time received
  1143.           gapdos.localc       0 = user, 1 = sysop, 2 = local user
  1144.           gapdos.minavail     Total minutes available to user
  1145.           gapdos.port         Port being used
  1146.           gapdos.timecredit   Any time credits user may have
  1147.           gapdos.userbaud     User's bps rate
  1148.           l.ocal              0 = remote user, 1 = local
  1149.           level               User's security level
  1150.           minsleft            Number of minutes user has left at door start
  1151.           node                Node number. 0 = single user
  1152.           noup                1 = get.string will not uppercase
  1153.           page                User's page length
  1154.           parity              Should actually be data bits and is not used
  1155.           pcbsys.minsleft     Minutes left for caller
  1156.           pcbsys.timeallowed  Allowed time in minutes
  1157.           pcbsys.timecredit   Any time credits in minutes
  1158.           pcbsys.timegiven    Highest forum time given
  1159.           pcbsys.timeon       Time user logged on in minutes
  1160.           pcbsys.timeused     Time user has used that day
  1161.  
  1162.  
  1163.  
  1164.                                        Page 18
  1165.  
  1166.  
  1167.  
  1168.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1169.  
  1170.  
  1171.           pcbsys.ttlbytes     Total K bytes available
  1172.           pcbsys.userrec      User's record number
  1173.           pcbuser.downbytes   Total download bytes. Use CVDMBF
  1174.           pcbuser.timeson     Number of times on
  1175.           pcbuser.uploads     Number of uploads
  1176.           port                Communications port in use
  1177.           printer             Printer Toggle. 0 = off, 1 = on
  1178.           s.creen             Screen display. 0 = off, 1 = on
  1179.           timecredit          Time credits for user (in minutes)
  1180.           timeleft            Time user has left (in minutes)
  1181.           user.curdown        Total files dowloaded today
  1182.           user.lastfrm        Last forum in
  1183.           user.level          Security Level
  1184.           user.minutes        Total minutes last call
  1185.           user.page           Page length
  1186.  
  1187.           LONGS
  1188.           -----
  1189.  
  1190.           baud                DTE rate to open COMM port at
  1191.           downbytes           Total bytes downloaded
  1192.           downloads           Number of downloads
  1193.           gapdos.callbytes    Ttl bytes available for download
  1194.           gapdos.joined       Bit flags of forums joined
  1195.           gapdos.starttime    Time (in seconds) user logged on
  1196.           maxbytes            Maximum number of bytes allowed to download
  1197.           recnum              User's record number in USER file
  1198.           starttime           Time the user logged on (in seconds)
  1199.           temptime            For calculating keyboard time out
  1200.           timenow             Time it is now  (in seconds)
  1201.           timeson             Number of times user has been on
  1202.           upbytes             Total bytes uploaded
  1203.           uploads             Number of uploads
  1204.           userbaud            BPS rate of the remote user
  1205.           user.blts           Total bulletins read
  1206.           user.curbytes       Total bytes downloaded this call
  1207.           user.doors          Total doors opened
  1208.           user.downloads      Total downloads
  1209.           user.joined         Total forums joined
  1210.           user.lastmsg        Last message read
  1211.           user.mesleft        Total messages left
  1212.           user.mesread        Total messages read
  1213.           user.timeson        Number of times on
  1214.           user.ttlbytes       Total bytes downloaded
  1215.           user.ttlmins        Total mins on
  1216.           user.upbytes        Total bytes uploaded
  1217.           user.uploads        Total uploads
  1218.  
  1219.           STRINGS
  1220.           -------
  1221.  
  1222.           anystring1          garbage collector
  1223.           bbs.dir             Path to BBS default dir
  1224.           birthday            Callers birth date
  1225.  
  1226.  
  1227.  
  1228.                                        Page 19
  1229.  
  1230.  
  1231.  
  1232.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1233.  
  1234.  
  1235.           board.name          Name of the BBS
  1236.           bphone              User's business or data phone number
  1237.           city                User's home town
  1238.           first               User's first name
  1239.           gapdos.didnew       1 = did a new files scan
  1240.           gapdos.exitdos      1 = exit to DOS after call
  1241.           gapdos.userfirst    User's first name
  1242.           gapdos.userindex    User's index into user file
  1243.           gapdos.username     User's full name
  1244.           gendir              Path to the gen directory
  1245.           hphone              User's home phone number
  1246.           last                User's last name
  1247.           lastdate            Last date user was on
  1248.           maindir             Path to the main directory
  1249.           password            User's password. PASSWORD if sysop is on
  1250.           pcbsys.baud         Com port bps rate
  1251.           pcbsys.calleralarm  Caller alarm   -1=on,0=off
  1252.           pcbsys.colorc       Color toggle   Y,N,7
  1253.           pcbsys.ctime        Time user logged on as HH:MM
  1254.           pcbsys.display      Display on/off -1=on,0=off
  1255.           pcbsys.eactive      Event active   -1=yes,0=no
  1256.           pcbsys.errcorrect   ECC modem      -1=yes,0=no
  1257.           pcbsys.event        Event time as HH:MM
  1258.           pcbsys.forumnum     Forum user was in  "0" = main
  1259.           pcbsys.node         Node number as short integer
  1260.           pcbsys.pagebell     Page bell      -1=on,0=off
  1261.           pcbsys.password     User's password
  1262.           pcbsys.port         Com port as "0","1", or "2"
  1263.           pcbsys.printer      Printer on/off -1=on,0=off
  1264.           pcbsys.sevent       Slide event    -1=yes,0=no
  1265.           pcbsys.sysopnext    Sysop on next  N,X,space
  1266.           pcbsys.userbaud     Caller bps rate (Local if local mode)
  1267.           pcbsys.userfirst    User's first name
  1268.           pcbsys.username     Name of caller
  1269.           pcbuser.bphone      User's work or data phone number
  1270.           pcbuser.city        City, state, and zip
  1271.           pcbuser.cnfregis    Forum registration
  1272.           pcbuser.delete      Delete, Y=yes,N=no
  1273.           pcbuser.downloads   Number of downloads
  1274.           pcbuser.expert      Expert mode Y=yes,N=no
  1275.           pcbuser.hphone      User's home phone
  1276.           pcbuser.lastconf    Last forum in
  1277.           pcbuser.lastdate    Last date user was on
  1278.           pcbuser.lastdir     Last New files scan
  1279.           pcbuser.lastime     Last time user was on
  1280.           pcbuser.lastmsg     Last message read in main. Use CVSMBF
  1281.           pcbuser.lastmsg1    Last message read in each forum
  1282.           pcbuser.level       User's level as short integer
  1283.           pcbuser.name        User's name
  1284.           pcbuser.page        Page length
  1285.           pcbuser.passwd      User's password
  1286.           pcbuser.protocol    Protocol type
  1287.           pcbuser.regisdate   Registration date
  1288.           pcbuser.upbytes     Total upload bytes. Use CVDMBF
  1289.  
  1290.  
  1291.  
  1292.                                        Page 20
  1293.  
  1294.  
  1295.  
  1296.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1297.  
  1298.  
  1299.           subscrip            Date user's subscription expires
  1300.           sysname             Sysop's name
  1301.           user.bphone         User's work or data phone number
  1302.           user.city           City, state, and zip (padded)
  1303.           user.expert         Novice = N, expert = Y
  1304.           user.fname          User's first name (padded)
  1305.           user.handle         User's handle (padded)
  1306.           user.hphone         User's home phone number
  1307.           user.lastdate       Last date on - mm/dd/yy
  1308.           user.lastdir        Date last looked at a directory listing
  1309.           user.lasttime       Last time on - hh:mm
  1310.           user.lname          User's last name (padded)
  1311.           user.passwd         User's password (padded)
  1312.           user.private        Allow on private nodes?
  1313.           user.protocol       Transfer protocol (padded)
  1314.           user.subscribe      Date user's subscription expires
  1315.           user.sysop          Sysop record, 1 = Y, 0 = N
  1316.           username            User's full name
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.                                        Page 21
  1357.  
  1358.  
  1359.  
  1360.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1361.  
  1362.  
  1363.                      FUNCTIONS AND SUBROUTINES - QUICK REFERENCE
  1364.                      -------------------------------------------
  1365.  
  1366.           a.ccess%            Checks for the existence of a file.
  1367.           ansi                Displays ANSI escape sequences.
  1368.           backspace           Sends one or more backspaces.
  1369.           ckeypress%          Checks for a remote or local key press.
  1370.           clear.scr           Clears the local and remote screens
  1371.           do.chat             To allow sysop to chat with remote user.
  1372.           elap.time           Computes elapsed time.
  1373.           get.string          Gets a string of characters.
  1374.           get.time&           Returns number of seconds since 01/01/70.
  1375.           getakey%            Gets one key responses.
  1376.           getrand%            Returns a random number.
  1377.           init.door           Initializes the Door.
  1378.           leave               Shuts down door and returns to the BBS.
  1379.           more                Checks for a full screen.
  1380.           nl                  Sends a CR/LF to local and remote.
  1381.           no.carrier          Prints a message if carrier lost.
  1382.           pagesysop           Alerts sysop that the user wants to chat.
  1383.           pause               Sends a "Press [Any Key] To Continue" prompt.
  1384.           putachar            Sends a single character.
  1385.           putkey              Used by chat for word wrapping.
  1386.           read.cnf            Reads the door configuration file.
  1387.           read.doorsys%       Reads DOOR.SYS.
  1388.           read.gapdos%        Reads GAPDOS.DAT.
  1389.           read.gapuser%       Reads USERS.DAT.
  1390.           read.pcbsys%        Reads PCBOARD.SYS.
  1391.           read.pcbuser%       Reads PCB USERS file.
  1392.           read.score%         Reads and displays the scoreboard.
  1393.           right.trim$         Trims spaces from string.
  1394.           set.status          Displays status line.
  1395.           show.file           Displays text files.
  1396.           show.mess           Displays a message.
  1397.           time.credit         Gives credits for time used.
  1398.           time.left           Computes time remaining.
  1399.           update.clock        Updates status line clock.
  1400.           waitasec            Pauses for x number of seconds.
  1401.           wrap.word           Wraps a word.
  1402.           write.gapdos%       Writes GAPDOS.DAT.
  1403.           write.gapuser%      Writes USERS.DAT.
  1404.           write.pcbsys%       Writes PCBOARD.SYS.
  1405.           write.pcbuser%      Writes PCB USERS.
  1406.           write.score         Creates and maintains the scoreboard.
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.                                        Page 22
  1421.  
  1422.  
  1423.  
  1424.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1425.  
  1426.  
  1427.                         FUNCTIONS AND SUBROUTINES - REFERENCE
  1428.                         -------------------------------------
  1429.  
  1430.           Functions always return a value.  The type of the return value is
  1431.           denoted by  the type  modifier after a function name.  The return
  1432.           value should  be assigned  to a  variable of  the same  type. For
  1433.           instance, the  function get.time&  returns a long integer. To re-
  1434.           trieve the return value, assign it to an long integer as :
  1435.  
  1436.                long.int& = get.time&
  1437.  
  1438.           Subroutines do not return a value.  To call a subroutine, use the
  1439.           Basic CALL function :
  1440.  
  1441.                call get.string
  1442.  
  1443.  
  1444.           Note that the functions contained in the assembler source modules
  1445.           are documented  in the  printed manual.  They are  not  described
  1446.           here.
  1447.  
  1448.  
  1449.                   Name :  a.ccess%
  1450.                Purpose :  Checks for the existence of a file.
  1451.             Parameters :  Full path and name of file
  1452.           Return Value :  0 = file was found, 1 = file not found
  1453.  
  1454.            Description :  In order to avoid Basic errors that occur when
  1455.                           trying to open a file that does not exist, this
  1456.                           function should be used prior to opening any
  1457.                           file.
  1458.  
  1459.                Example :  r% = access%("GAPQBDR.DOC")
  1460.                           if r% <> 0 then
  1461.                             call show.mess("Can't Find GAPQBDR.DOC",NO,YES)
  1462.                           end if
  1463.  
  1464.  
  1465.                   Name :  ansi
  1466.                Purpose :  Displays ANSI escape sequences
  1467.             Parameters :  ANSI color to display
  1468.           Return Value :  None
  1469.  
  1470.            Description :  This function will send a string of ANSI escape
  1471.                           sequences to the remote user and to the local
  1472.                           console.  The ANSI codes for the various colors
  1473.                           are defined as constants in the GAPQBDR.BI file.
  1474.                           If the remote or local user is in non graphics
  1475.                           mode, the function returns immediately.
  1476.  
  1477.                Example :  call ansi(BWHITE)
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.                                        Page 23
  1485.  
  1486.  
  1487.  
  1488.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1489.  
  1490.  
  1491.                   Name :  backspace
  1492.                Purpose :  Sends one or more backspaces
  1493.             Parameters :  Number of backspaces to send
  1494.           Return Value :  None
  1495.  
  1496.            Description :  In order to actually erase a character on the
  1497.                           screen, you must send a 3 character sequence
  1498.                           which consists of backspace, space, backspace.
  1499.                           This function will send as many of these 3 char-
  1500.                           acter sequences as you specify in the parameter
  1501.                           list.
  1502.  
  1503.                Example :  call backspace(1)
  1504.                           str$ = "Press Any Key "        ' set up string
  1505.                           call show.mess(str$,NO,NO)     ' show string
  1506.                           c% = getkeyc%                  ' get a key
  1507.                           call backspace(len(str$))      ' erase string
  1508.  
  1509.  
  1510.                   Name :  ckeypress%
  1511.                Purpose :  Checks for a remote or local key press
  1512.             Parameters :  None
  1513.           Return Value :  0 = no key is waiting, 1 = a key is waiting
  1514.  
  1515.            Description :  This function will check the local keyboard as
  1516.                           well as the communications receive buffer to see
  1517.                           if a key is waiting to be read.  It is most often
  1518.                           used in loops that need to receive a 1 character
  1519.                           keystroke.
  1520.  
  1521.                Example :  c% = ckeypress%                ' key pressed?
  1522.  
  1523.                           c% = 0   ' initialize
  1524.                           do
  1525.                              |  ' do something
  1526.                              |
  1527.                              c% = ckeypress%             ' key pressed?
  1528.                           until c% <> 0                  ' key pressed,exit
  1529.  
  1530.  
  1531.                   Name :  clear.scr
  1532.                Purpose :  Clears local and remote screens.
  1533.             Parameters :  None
  1534.           Return Value :  None
  1535.  
  1536.            Description :  This routine will call CLS23 to clear the local
  1537.                           screen.  If the remote caller is in non-color
  1538.                           mode, it sends a CHR$(12) to the remote screen,
  1539.                           otherwise it sends the ANSI clear screen
  1540.                           sequence.
  1541.  
  1542.                Example :  call clear.scr                 ' clear screen
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.                                        Page 24
  1549.  
  1550.  
  1551.  
  1552.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1553.  
  1554.  
  1555.                   Name :  do.chat
  1556.                Purpose :  To allow sysop to chat with remote user
  1557.             Parameters :  None
  1558.           Return Value :  None
  1559.  
  1560.            Description :  This function allows a one on one chat with a re-
  1561.                           mote user.  If the caller is in graphics mode,
  1562.                           the sysop's key presses will be displayed in
  1563.                           green and the remote user's key presses will be
  1564.                           displayed in white. Text will automatically wrap
  1565.                           at column 76.  To exit chat, press either the ESC
  1566.                           key or type a CTRL-X.  Note that the user may
  1567.                           also send these characters to end chat. The user
  1568.                           will receive full credit for the time spent chat-
  1569.                           ting with the sysop.  However, this function will
  1570.                           not update the BBS system file so it is possible
  1571.                           that the user may be logged off (with an out of
  1572.                           time message) when he/she returns to the BBS.
  1573.  
  1574.                Example :  call do.chat
  1575.  
  1576.                           response$ = " "                ' initialize
  1577.                           call get.string(response$)     ' get a string
  1578.                           if response$ = "P" then        ' paging sysop
  1579.                              call do.chat                ' chat with sysop
  1580.                           end if
  1581.  
  1582.  
  1583.                   Name :  elap.time
  1584.                Purpose :  Computes elapsed time while waiting for keyboard
  1585.                           input
  1586.             Parameters :  None
  1587.           Return Value :  None
  1588.  
  1589.            Description :  This function is used in loops that await a key-
  1590.                           board response.  Prior to entering the loop, the
  1591.                           variable called temptime should be initialized
  1592.                           with the current time. Once inside the loop, this
  1593.                           function should be called to keep track of the
  1594.                           elapsed time. If there is no keyboard response
  1595.                           within 4 minutes, the user will be logged off.
  1596.  
  1597.                Example :  call elap.time
  1598.  
  1599.                           temptime& = get.time&          ' start timer
  1600.                           do
  1601.                              gc = getakey%               ' get a key
  1602.                              if gc <> 0 then             ' key pressed
  1603.                                 exit do                  ' exit and process
  1604.                              end if
  1605.                              call elap.time              ' activity?
  1606.                           loop  ' continue
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.                                        Page 25
  1613.  
  1614.  
  1615.  
  1616.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1617.  
  1618.  
  1619.                   Name :  get.string
  1620.                Purpose :  Gets a string of characters
  1621.             Parameters :  String to fill
  1622.           Return Value :  None
  1623.  
  1624.            Description :  This is the main input routine.  It will get a
  1625.                           string from either the remote user or the local
  1626.                           keyboard.  The string passed will be set to the
  1627.                           characters received. The length of the input
  1628.                           string is determined by the length of the string
  1629.                           passed. Do not pass a fixed length string to this
  1630.                           routine.
  1631.  
  1632.                           Before calling, you must initialize the passed
  1633.                           string with spaces.  The number of spaces in the
  1634.                           string determines the number of characters al-
  1635.                           lowed to be input. If a user attempts to type
  1636.                           more characters than allowed, the cursor will not
  1637.                           move pass the end of the string.  Input ends when
  1638.                           the Enter key is pressed.
  1639.  
  1640.                           To initialize the string, use the Basic space$
  1641.                           function (IE, input$ = space$(10) - initializes
  1642.                           input$ to 10 spaces).
  1643.  
  1644.                           WARNING : It is extremely important that the
  1645.                           passed string be initialized.  Failure to set the
  1646.                           string to spaces, will cause unpredictable
  1647.                           results!
  1648.  
  1649.                           This function does not return a new string con-
  1650.                           taining the keyboard input.  Instead, it modifies
  1651.                           the string you pass to it in the parameter list.
  1652.                           The string will be stripped of any trailing
  1653.                           spaces.
  1654.  
  1655.                           get.string automatically uppercases the string.
  1656.                           If you wish to disable this feature, set the
  1657.                           variable noup to 1.
  1658.  
  1659.                           get.string will automatically check for keyboard
  1660.                           activity so it is not necessary for you to do so.
  1661.  
  1662.                Example :  instr$ = space$(10)              ' initialize
  1663.                           call get.string(instr$)          ' get string
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.                                        Page 26
  1677.  
  1678.  
  1679.  
  1680.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1681.  
  1682.  
  1683.                   Name :  get.time&
  1684.                Purpose :  Gets the number of seconds elapsed since 01/01/70
  1685.             Parameters :  None
  1686.           Return Value :  Number of seconds since 01/01/70
  1687.  
  1688.            Description :  This routine is equivalent to the C time() func-
  1689.                           tion. It is used throughout the GAPQBDR module to
  1690.                           compute various times.  This function is not sus-
  1691.                           ceptible to the midnight roll over problem so
  1692.                           prevalent in Basic communications programs.
  1693.  
  1694.                           Note that the return value is of type LONG.  You
  1695.                           must cast the return value to a LONG INTEGER or
  1696.                           loss of significant digits will result.
  1697.  
  1698.                Example :  dim ltime as long              ' declare as long
  1699.                           ltime = get.time&              ' get the time
  1700.  
  1701.                           ' if you don't like declaring variables, you can
  1702.                           ' do it the old fashioned way
  1703.  
  1704.                           longtime& = get.time&           ' get the time
  1705.  
  1706.  
  1707.                   Name :  getakey%
  1708.                Purpose :  Gets one key responses
  1709.             Parameters :  None
  1710.           Return Value :  ASCII code for the key pressed or 0
  1711.  
  1712.            Description :  This is the main keyboard input routine
  1713.                           (internal). It is called by get.string as well as
  1714.                           any keyboard polling loops.  It checks the re-
  1715.                           ceive buffer as well as the local keyboard for a
  1716.                           key press.  If one is not found it returns 0.
  1717.                           The character input is not echoed. Since 99% of
  1718.                           all keyboard input comes from this routine, it
  1719.                           checks for carrier, time remaining, keyboard
  1720.                           time-out, as well as special sysop function keys.
  1721.                           The "timeleft" variable is updated via this rou-
  1722.                           tine.  This is the variable you would normally
  1723.                           use in a prompt such as,
  1724.  
  1725.                               [20 mins left] Main Command :
  1726.  
  1727.                Example :  c% = getakey
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.                                        Page 27
  1741.  
  1742.  
  1743.  
  1744.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1745.  
  1746.  
  1747.                   Name :  getrand%
  1748.                Purpose :  Gets a random number
  1749.             Parameters :  Low number, high number
  1750.           Return Value :  A random number
  1751.  
  1752.            Description :  This routine is provided because it is much
  1753.                           easier to use and understand than Basic's random
  1754.                           function.  Provide as parameters two integers.
  1755.                           The first parameter is the lowest number you will
  1756.                           accept as a random number, and the second parame-
  1757.                           ter is the highest random number you will accept.
  1758.                           The function will return a random integer between
  1759.                           the range specified (low and high are included in
  1760.                           the range of numbers).  It is not necessary to
  1761.                           seed the random number generator as this is done
  1762.                           automatically for you during program
  1763.                           initialization.
  1764.  
  1765.                Example :  rndnum% = getrand% (1,10)      ' get a random
  1766.                                                          ' number between 1
  1767.                                                          ' and 10
  1768.  
  1769.  
  1770.                   Name :  init.door
  1771.                Purpose :  Initializes the GAPQBDR functions
  1772.             Parameters :  None
  1773.           Return Value :  None
  1774.  
  1775.            Description :  This routine must be called immediately after
  1776.                           calling read.cnf.  It initializes the door, opens
  1777.                           and reads system files, initializes the comm
  1778.                           port, initializes global variables and in gen-
  1779.                           eral, makes sure that all of the files required
  1780.                           for operation are present. There is no return
  1781.                           value.  If an error occurs while trying to ini-
  1782.                           tialize, the function will display an error mes-
  1783.                           sage and end the program.
  1784.  
  1785.                Example :  call read.cnf("DOOR.CFG")      ' read config file
  1786.                           call init.door                 ' init the door
  1787.  
  1788.  
  1789.                   Name :  leave
  1790.                Purpose :  Exits the program
  1791.             Parameters :  None
  1792.           Return Value :  None
  1793.  
  1794.            Description :  When the program terminates, it must call this
  1795.                           function to end.  This is the ONLY proper exit
  1796.                           from the door.
  1797.  
  1798.                Example :  call leave
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.                                        Page 28
  1805.  
  1806.  
  1807.  
  1808.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1809.  
  1810.  
  1811.                   Name :  more
  1812.                Purpose :  Checks for a full screen and issues a More Prompt
  1813.             Parameters :  None
  1814.           Return Value :  None
  1815.  
  1816.            Description :  This is an internal routine that is called by the
  1817.                           character output functions.
  1818.  
  1819.                Example :
  1820.  
  1821.  
  1822.                   Name :  nl
  1823.                Purpose :  To send a Carriage Return and Line Feed to local
  1824.                           and remote
  1825.             Parameters :  Number of New Line's to send
  1826.           Return Value :  None
  1827.  
  1828.            Description :  To send a blank line, call this routine with the
  1829.                           number of blank lines you wish to send.
  1830.  
  1831.                Example :  call nl(2)                     ' send two blank
  1832.                              ' lines
  1833.  
  1834.  
  1835.                   Name :  no.carrier
  1836.                Purpose :  Prints a message and calls leave()
  1837.             Parameters :  None
  1838.           Return Value :  None
  1839.  
  1840.            Description :  Internal routine that is called when there is a
  1841.                           loss of carrier.  Displays a message to the local
  1842.                           screen and then calls leave to terminate the
  1843.                           program.
  1844.  
  1845.                           If you have a routine that checks for carrier and
  1846.                           you wish to display the standard "No Carrier"
  1847.                           message and log the user off, call this function.
  1848.  
  1849.                Example :  call no.carrier
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.                                        Page 29
  1869.  
  1870.  
  1871.  
  1872.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1873.  
  1874.  
  1875.                   Name :  pagesysop
  1876.                Purpose :  Alerts sysop that user wants to chat
  1877.             Parameters :  None
  1878.           Return Value :  None
  1879.  
  1880.            Description :  Allows the programer to provide the user with a
  1881.                           Page Sysop command.  The page lasts for 30
  1882.                           seconds and can be aborted by typing CTRL K. If
  1883.                           the sysop's page bell is on, the sysop's speaker
  1884.                           will also sound.  To answer the page, the sysop
  1885.                           should press CTRL F10.
  1886.  
  1887.                Example :  response$ = " "                ' initialize var
  1888.                           call get.string(response$)     ' wait for a key
  1889.                           if response$ = "P" then        ' wants to chat
  1890.                              call pagesysop              ' tell sysop
  1891.                           end if
  1892.  
  1893.  
  1894.                   Name :  pause
  1895.                Purpose :  Sends a "Press [Any Key] To Continue" prompt
  1896.             Parameters :  None
  1897.           Return Value :  None
  1898.  
  1899.            Description :  This function sends a pause prompt and waits for
  1900.                           a key press.
  1901.  
  1902.                Example :  call nl(1)                     ' send blank line
  1903.                           call pause                     ' wait for a key
  1904.  
  1905.  
  1906.                   Name :  putachar
  1907.                Purpose :  Send a single character to local and remote
  1908.             Parameters :  ASCII character to send
  1909.           Return Value :  None
  1910.  
  1911.            Description :  This routine is called a "semi-unfiltered" char-
  1912.                           acter output routine because it allows for most
  1913.                           ASCII characters to be output.
  1914.  
  1915.                Example :  c% = ASC("A")                  ' send an 'A'
  1916.                           call putachar(c%)              ' to local and
  1917.                                                          ' remote screen
  1918.  
  1919.                           c% = getakey%                  ' get a keypress
  1920.                           if (c% <> 0 then               ' if we got a key
  1921.                              call putachar(c%)           ' display the
  1922.                           end if                         ' character
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.                                        Page 30
  1933.  
  1934.  
  1935.  
  1936.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  1937.  
  1938.  
  1939.                   Name :  putkey
  1940.                Purpose :  Used by chat routines to keep track of word
  1941.                           wrapping
  1942.             Parameters :  Character to send
  1943.           Return Value :  None
  1944.  
  1945.            Description :  This is the main output routine for the chat
  1946.                           functions. It keeps track of the current column,
  1947.                           and decides when it is time to wrap a word.  It
  1948.                           should not be called by the programmer's routines
  1949.                           since putachar is faster and more efficient.
  1950.  
  1951.                Example :
  1952.  
  1953.  
  1954.                   Name :  read.cnf
  1955.                Purpose :  To read the door configuration file
  1956.             Parameters :  Full path and file name to the configuration
  1957.                           file.
  1958.           Return Value :  None
  1959.  
  1960.            Description :  Opens the configuration file for the current
  1961.                           door. Normally the passed parameter is the name
  1962.                           of the door with a .CNF extension (it is assumed
  1963.                           that the file is in the same directory as the
  1964.                           door program). If an error occurs, the program
  1965.                           ends immediately.
  1966.  
  1967.                           WARNING : The first three lines of this
  1968.                           configuration file belong to the GAPQBDR
  1969.                           interface module.  You are free to use the
  1970.                           information, but the information contained in the
  1971.                           first three lines must conform exactly to the
  1972.                           following specifications.
  1973.  
  1974.                           The first line of this file is the full drive and
  1975.                           path to the BBS default directory.  This is the
  1976.                           directory where the BBS system files can be found
  1977.                           (IE, GAPDOS.DAT, DOOR.SYS, GAPBBS.CNF).  The en-
  1978.                           try on line 1 is not checked until init.door is
  1979.                           called.
  1980.  
  1981.                           The second line of this file is the name of the
  1982.                           BBS.
  1983.  
  1984.                           The third line is the BBS flag.
  1985.  
  1986.                           It is the responsibility of the door author to
  1987.                           describe the format of these three lines to the
  1988.                           end user.  It is also the responsibility of the
  1989.                           door author to insure that the end user have
  1990.                           these three lines in the door configuration file.
  1991.                           If your door program requires no configuration
  1992.                           parameters of its own, you can simply distribute
  1993.  
  1994.  
  1995.  
  1996.                                        Page 31
  1997.  
  1998.  
  1999.  
  2000.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2001.  
  2002.  
  2003.                           a sample "door".cnf file with these three lines
  2004.                           already in it.
  2005.  
  2006.                           GAPQBDR will NOT close this file (file #1) after
  2007.                           reading the first three lines.  It leaves the
  2008.                           file open for the programmer's use.  If your door
  2009.                           does require certain configuration parameters,
  2010.                           have your users place the parameters in the file
  2011.                           starting with line 4.  If you use a set up pro-
  2012.                           gram, be sure that your set up program writes the
  2013.                           first three lines as specified.
  2014.  
  2015.                           After you have called read.cnf and init.door, if
  2016.                           you have any configuration options in the
  2017.                           "door".cnf file, you should line input those op-
  2018.                           tions.  Then close file #1.  Even if you have no
  2019.                           options to read, close the file.
  2020.  
  2021.                           WARNING : You MUST call this routine before using
  2022.                           any of the GAPQBDR functions.  After calling this
  2023.                           routine, you MUST call init.door.
  2024.  
  2025.                Example :  call read.cnf("TOURIST.CNF")
  2026.                           call init.door
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.                                        Page 32
  2061.  
  2062.  
  2063.  
  2064.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2065.  
  2066.  
  2067.                   Name :  read.doorsys%
  2068.                Purpose :  Reads the DOOR.SYS universal door interface file
  2069.             Parameters :  None
  2070.           Return Value :  0 = no error, 1 = error
  2071.  
  2072.            Description :  Internal routine called by init.door.  Reads the
  2073.                           DOOR.SYS file and initializes any global vari-
  2074.                           ables that depend on the information in that
  2075.                           file.
  2076.  
  2077.                Example :  c% = read.doorsys%
  2078.  
  2079.  
  2080.                   Name :  read.gapdos%
  2081.                Purpose :  Reads the GAP Communications DOS file.
  2082.             Parameters :  None
  2083.           Return Value :  0 = no error, 1 = error
  2084.  
  2085.            Description :  Reads the GAPDOS.DAT remote exit to DOS file.  If
  2086.                           you have a need for the information in this file,
  2087.                           or if you need to modify the record variables,
  2088.                           this function will read the file for you.  The
  2089.                           record variables are contained in a variable
  2090.                           called gapdos.
  2091.  
  2092.                           WARNING : Do NOT modify the string fields in
  2093.                           GAPDOS.DAT. If the gapdos.userindex field is
  2094.                           changed, GAP will be unable to find the user in
  2095.                           the userfile upon return from the door.
  2096.  
  2097.                           The only proper way to update this file is to
  2098.                           first read it.  Make any changes to the variables
  2099.                           themselves or use your own temporary variables.
  2100.                           Then call write.gapdos to update the record.
  2101.  
  2102.                Example :  c% = read.gapdos%
  2103.  
  2104.  
  2105.                   Name :  read.gapuser%
  2106.                Purpose :  Reads the GAP Communications USERS.DAT file
  2107.             Parameters :  None
  2108.           Return Value :  0 = no error, 1 = error
  2109.  
  2110.            Description :  Reads the user record of the current user in the
  2111.                           GAP USERS.DAT file.  The record variables are
  2112.                           contained in a variable called user.
  2113.  
  2114.                Example :  c% = read.gapuser%
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.                                        Page 33
  2125.  
  2126.  
  2127.  
  2128.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2129.  
  2130.  
  2131.                   Name :  read.pcbsys%
  2132.                Purpose :  Reads the PCBOARD.SYS file.
  2133.             Parameters :  None
  2134.           Return Value :  0 = no error, 1 = error
  2135.  
  2136.            Description :  For a PCB setup, this function is automatically
  2137.                           called by init.door.  Do not use unless do.pcb is
  2138.                           set to 1.
  2139.  
  2140.                Example :  c% = read.pcbsys%
  2141.  
  2142.                   Name :  read.pcbuser%
  2143.                Purpose :  Reads the PCB USERS file.
  2144.             Parameters :  None
  2145.           Return Value :  0 = no error, 1 = error
  2146.  
  2147.            Description :  For a PCB setup, this function is automatically
  2148.                           called by init.door.  Do not use unless do.pcb is
  2149.                           set to 1.  Note that to change the fields
  2150.                           downbytes, upbytes, or lastmsg, you will need to
  2151.                           use the QB functions CVSMBF or CVDMBF.
  2152.  
  2153.                Example :  c% = read.pcbuser%
  2154.  
  2155.  
  2156.                   Name :  read.score%
  2157.                Purpose :  Reads and displays the top 10 player file.
  2158.             Parameters :  Filename to read, message to display.
  2159.           Return Value :  0 = ok, 1 = file not found
  2160.  
  2161.            Description :  This function reads the scoreboard file and
  2162.                           displays it to the caller.  Pass as the first
  2163.                           parameter, the name of the scoreboard file. The
  2164.                           second parameter is a string to display prior to
  2165.                           showing the actual scores.
  2166.  
  2167.                Example :  c% = read.score% ("SCORE.DAT","Top 10 Players")
  2168.                           if c% = 1 then
  2169.                              call show_mess("No winners yet!",NO,YES)
  2170.                           end if
  2171.  
  2172.  
  2173.                   Name :  right.trim$
  2174.                Purpose :  Trims spaces from the end of NULL terminated
  2175.                           strings
  2176.             Parameters :  String containing the spaces.
  2177.           Return Value :  String without the spaces.
  2178.  
  2179.            Description :  This function will remove the NULL and trim any
  2180.                           spaces from the right end of any 'C' string.
  2181.  
  2182.                Example :  username$ = right.trim$(gapdos.username)
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.                                        Page 34
  2189.  
  2190.  
  2191.  
  2192.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2193.  
  2194.  
  2195.                   Name :  set.status
  2196.                Purpose :  To display and update the sysop status line
  2197.             Parameters :  0 = set the status line, 1 = update the status
  2198.                           line, 4 = show other user stats
  2199.           Return Value :  None
  2200.  
  2201.            Description :  This routine is used internally.  There should be
  2202.                           no reason to call it unless you have modified a
  2203.                           user's stats and you need to update those stats
  2204.                           on the status line.  In this case, you should use
  2205.                           option 0.
  2206.  
  2207.                Example :  call set.status(0)
  2208.  
  2209.  
  2210.                   Name :  show.file
  2211.                Purpose :  To display a text file
  2212.             Parameters :  The full path and file name to the file to be
  2213.                           shown
  2214.           Return Value :  None
  2215.  
  2216.            Description :  Many door programs have welcome, news, exit, help
  2217.                           and other files to show to the user at various
  2218.                           points in the program.  This is the function that
  2219.                           allows you to do that.  This function tries to be
  2220.                           as intelligent as it possibly can in determining
  2221.                           the sysop's wishes. To display a file to the
  2222.                           user, call the function with the full
  2223.                           drive\path\filename of the file to display.
  2224.  
  2225.                           If you have color and non-color versions of files
  2226.                           pass the name of the non-color version as this
  2227.                           function will automatically append a "G" to the
  2228.                           filename if the user is in color mode.  In fact,
  2229.                           this function will ALWAYS try to find a file with
  2230.                           a "G" appended to the end of the name (if the
  2231.                           user is in color mode) before it looks for the
  2232.                           actual file by the name you specified.  If you
  2233.                           pass "WELCOMEG" to this function and the user is
  2234.                           in color mode, it will first try to find a file
  2235.                           with the name of "WELCOMEGG".
  2236.  
  2237.                           As with GAP Communications, your text files can
  2238.                           have certain control characters as the first
  2239.                           character in the file.  A "{" signals that the
  2240.                           more prompt should never display.  In other
  2241.                           words, GAPQBDR will not keep track of the number
  2242.                           of lines displayed and will never issue a more
  2243.                           prompt.  This is useful for very long ANSI files.
  2244.                           A "@" signals that the pause prompt should be
  2245.                           displayed when the screen is full instead of a
  2246.                           more prompt.  This is very handy when you want
  2247.                           the user to see the file in its entirety.  The
  2248.                           user will not be allowed to break out of the file
  2249.  
  2250.  
  2251.  
  2252.                                        Page 35
  2253.  
  2254.  
  2255.  
  2256.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2257.  
  2258.  
  2259.                           read.
  2260.  
  2261.                           WARNING : The "{" or "@" MUST appear as the VERY
  2262.                           first character in the file.  If you use an ANSI
  2263.                           editor, be aware that the first few characters in
  2264.                           a file will usually be an ANSI color sequence.
  2265.                           You normally have to edit the file with a text
  2266.                           editor to insert the control character.
  2267.  
  2268.                           Because QB 4.x is EXTREMELY slow when it comes to
  2269.                           function calls, all input and output is done "in
  2270.                           line". Despite QB's high overhead, this function
  2271.                           is pretty fast.
  2272.  
  2273.                           GAPQBDR does not have GAP's ability to protect
  2274.                           the status line.  Because of this, it is possible
  2275.                           for an ANSI file that contains clear screen codes
  2276.                           to erase the status line.  At the end of the
  2277.                           function, the status line will be re-drawn just
  2278.                           in case.  Since most ANSI files contain the clear
  2279.                           screen codes at the beginning of the file,
  2280.                           show.file will remove any such codes during the
  2281.                           first read of the file.
  2282.  
  2283.                           Pressing CTRL K or CTRL X will abort any file
  2284.                           display if the file does not begin with a "@".
  2285.  
  2286.                           REMEMBER : If you have both color and non-color
  2287.                           versions of the same files, pass the name of the
  2288.                           non-color version.  Also, the actual disk files
  2289.                           must be named in such a way that they have no
  2290.                           file extension and the color version ends with a
  2291.                           "G".
  2292.  
  2293.                Example :  call show.file("WELCOME")
  2294.                           call show.file("C:\GAP\GEN\WELCOME")
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.                                        Page 36
  2317.  
  2318.  
  2319.  
  2320.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2321.  
  2322.  
  2323.                   Name :  show.mess
  2324.                Purpose :  Displays a message
  2325.             Parameters :  Message, ring the bell, issue a New Line
  2326.           Return Value :  None
  2327.  
  2328.            Description :  Finally!  After all of this, just how do you dis-
  2329.                           play a message to the user?  Well, here it is.
  2330.                           This is the string output function for GAPQBDR.
  2331.                           Under most circumstances, this is the one func-
  2332.                           tion that you would call to display output to the
  2333.                           user. There should be no reason to ever call
  2334.                           putkey or putachar, as they are basically inter-
  2335.                           nal routines.
  2336.  
  2337.                           There should be no reason to EVER use the Basic
  2338.                           print statement unless you need to display a mes-
  2339.                           sage to the local screen that you do not want the
  2340.                           remote user to see.  In other words, ALL string
  2341.                           output should be done through this function.  If
  2342.                           there is a reason to display information locally
  2343.                           it would be much easier and more efficient to
  2344.                           keep track of the l.ocal variable, set it to 1,
  2345.                           call show.mess with the strings to be displayed,
  2346.                           then restore the l.ocal variable to what it was
  2347.                           before, instead of using the print function which
  2348.                           cannot display ANSI sequences (forcing you to
  2349.                           translate ANSI codes to color statements).
  2350.  
  2351.                           The three parameters are :
  2352.  
  2353.                             1 - the string to display
  2354.                             2 - YES or NO if you want to sound the remote
  2355.                                 user's bell.
  2356.                             3 - YES or NO if you want to issue a CR/LF
  2357.                                 after displaying the string.
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.                                        Page 37
  2381.  
  2382.  
  2383.  
  2384.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2385.  
  2386.  
  2387.                Example :  ' the first show.mess displays the string and
  2388.                           ' leaves the cursor on the same line.  The second
  2389.                           ' show.mess displays the string, rings the remote
  2390.                           ' user's bell, and drops the cursor to the next
  2391.                           ' line.
  2392.  
  2393.                           call nl(1)
  2394.                           call show.mess("Are you ready? (Y/N) : ",NO,NO)
  2395.  
  2396.                           a$ = space$(3)
  2397.                           call get.string(a$)
  2398.  
  2399.                           if left$(a$,1) = "Y" then
  2400.                              ' begin whatever it is you want to begin
  2401.                           else
  2402.                              call nl(1)
  2403.                              call show.mess("Too Bad!",YES,YES)
  2404.                              end
  2405.                           end if
  2406.  
  2407.  
  2408.                   Name :  time.credit
  2409.                Purpose :  Keeps track of time and credits the user with
  2410.                           time elapsed
  2411.             Parameters :  1 = start timer, 0 = end timer
  2412.           Return Value :  None
  2413.  
  2414.            Description :  This is basically an internal routine called by
  2415.                           chat and sysop shell to DOS so that the user is
  2416.                           not penalized for time used.  It updates a global
  2417.                           variable called timecredit.  Timecredit is used
  2418.                           in the calculations that determine the user's
  2419.                           time remaining.
  2420.  
  2421.                           If you wish to use this feature in your own rou-
  2422.                           tines, prior to entering your routine, call
  2423.                           time.credit with a 1 and it will start the timer.
  2424.                           When your routine is finished, call time.credit
  2425.                           with a 0 and the timer will stop.  The variable
  2426.                           timecredit will be updated with the elapsed time.
  2427.  
  2428.                Example :  call time.credit(1)            ' start the timer
  2429.                           call do.chat                   ' chat with user
  2430.                           call time.credit(0)            ' stop the timer
  2431.  
  2432.                           ' Note that this is simply an example.  do.chat
  2433.                           ' calls time.credit on its own.  In the above
  2434.                           ' example, if the sysop chat with the user took
  2435.                           ' 10  minutes, the user will be credited with
  2436.                           ' that 10 minutes as will be reflected in the
  2437.                           ' timecredit variable.
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.                                        Page 38
  2445.  
  2446.  
  2447.  
  2448.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2449.  
  2450.  
  2451.                   Name :  time.left
  2452.                Purpose :  To compute the user's time remaining
  2453.             Parameters :  None
  2454.           Return Value :  None
  2455.  
  2456.            Description :  This is the routine that is called by the input
  2457.                           and output routines to compute the user's time
  2458.                           remaining. It is not necessary for the programmer
  2459.                           to call this routine directly.
  2460.  
  2461.                           A global variable called .i.timeleft; will be
  2462.                           updated with each call.  This variable may be
  2463.                           used in prompts that display the user's remaining
  2464.                           time.
  2465.  
  2466.                           As long as all input/output is performed thru
  2467.                           calls to the GAPQBDR library, the timeleft vari-
  2468.                           able will always be current.
  2469.  
  2470.                Example :  call time.left
  2471.  
  2472.  
  2473.                   Name :  update.clock
  2474.                Purpose :  Updates the status line clock
  2475.             Parameters :  None
  2476.           Return Value :  None
  2477.  
  2478.            Description :  Internal routine to update the status line clock.
  2479.  
  2480.                Example :
  2481.  
  2482.  
  2483.                   Name :  waitasec
  2484.                Purpose :  Pauses for the number of seconds specified.
  2485.             Parameters :  Number of seconds to pause
  2486.           Return Value :  None
  2487.  
  2488.            Description :  This function allows you to pause all processing
  2489.                           for the specified number of seconds.  It is in-
  2490.                           sensitive to processor speed and is immune to the
  2491.                           midnight rollover problem.
  2492.  
  2493.                Example :  call waitasec(10)              ' pause for 10 sec
  2494.  
  2495.  
  2496.                   Name :  wrap.word
  2497.                Purpose :  To wrap a word during sysop chats
  2498.             Parameters :  None
  2499.           Return Value :  None
  2500.  
  2501.            Description :  Internal function called by putkey to wrap words.
  2502.  
  2503.                Example :
  2504.  
  2505.  
  2506.  
  2507.  
  2508.                                        Page 39
  2509.  
  2510.  
  2511.  
  2512.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2513.  
  2514.  
  2515.  
  2516.                   Name :  write.gapdos%
  2517.                Purpose :  Updates the GAPDOS.DAT file
  2518.             Parameters :  None
  2519.           Return Value :  0 = no error, 1 = error
  2520.  
  2521.            Description :  This function allows the programmer to update the
  2522.                           GAP Communications remote exit to DOS system
  2523.                           file.  If the GAPDOS.DAT file is read at door be-
  2524.                           ginning,  the timecredit variable assigned to
  2525.                           gapdos.timecredit, and the GAPDOS.DAT file writ-
  2526.                           ten out at doors end, the user will be credited
  2527.                           with any time spent during a sysop chat or shell
  2528.                           to DOS.
  2529.  
  2530.                Example :  c% = read.gapdos%              ' read the file
  2531.  
  2532.                           if c% = 0 then                 ' if no error...
  2533.                              timecredit = gapdos.timecredit
  2534.  
  2535.                              ' do some processing
  2536.  
  2537.                              ' give the user 20 more minutes
  2538.  
  2539.                              timecredit = timecredit + 20
  2540.                              gapdos.timecredit = timecredit
  2541.                              c% = write.gapdos%          ' update the file
  2542.                           end if
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.                                        Page 40
  2573.  
  2574.  
  2575.  
  2576.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2577.  
  2578.  
  2579.                   Name :  write.gapuser%
  2580.                Purpose :  Updates the user record in GAP's USERS.DAT file
  2581.             Parameters :  None
  2582.           Return Value :  0 = no error, 1 = error
  2583.  
  2584.            Description :  This function allows you to update any variables
  2585.                           in the GAP USERS.DAT file for the current user.
  2586.  
  2587.                           WARNING : The GAP USERS.DAT file contains C char-
  2588.                           acter arrays.  These are equivalent to Basic's
  2589.                           fixed length strings with the exception that the
  2590.                           C strings have a NULL character (chr$(0)) in the
  2591.                           last position.  If you modify any of these fixed
  2592.                           length strings, you MUST make sure that the
  2593.                           string is fully padded with  spaces and that the
  2594.                           NULL character is placed in the last string posi-
  2595.                           tion.  When assigning a value to a fixed length
  2596.                           string, Basic will automatically pad the fixed
  2597.                           length string with spaces. All the programmer
  2598.                           need to is insure that the NULL is inserted at
  2599.                           the end of the string.
  2600.  
  2601.                           WARNING : The index for the user file consists of
  2602.                           the user's last name and first name.  Do not un-
  2603.                           der any circumstances modify either of these two
  2604.                           fields. Doing so will cause corruption of the
  2605.                           Index file.
  2606.  
  2607.                Example :  ' give the user a level of 50
  2608.  
  2609.                           c% = read.gapuser%             ' 1st read record
  2610.                           user.level = 50
  2611.                           c% = write.gapuser%            ' update the rec
  2612.  
  2613.                           ' allow user to change handle
  2614.  
  2615.                           c% = read.gapuser%
  2616.                           if c% = 0 then
  2617.                              call show.mess("Enter New Handle : ",NO,NO)
  2618.                              handle$ = space$(15)
  2619.                              call get.string(handle$)
  2620.                              if handle$ <> "" then
  2621.                                 user.handle = handle$
  2622.  
  2623.                                 mid$(user.handle,16,1) = chr$(0)
  2624.                                 c% = write.gapuser%
  2625.                                 if c% = 0 then
  2626.                                    show.mess("Saved new Handle",NO,YES)
  2627.                                 end if
  2628.                              end if
  2629.                           end if
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.                                        Page 41
  2637.  
  2638.  
  2639.  
  2640.           GAPQBDR       (C) Copyright 1988,1989 The GAP Development Company
  2641.  
  2642.  
  2643.                   Name :  write.pcbsys%
  2644.                Purpose :  Updates the PCBOARD.SYS file
  2645.             Parameters :  None
  2646.           Return Value :  0 = no error, 1 = error
  2647.  
  2648.            Description :  This function allows the programmer to update the
  2649.                           PCBOARD.SYS File.  Do not use unless do.pcb is
  2650.                           set to 1.
  2651.  
  2652.                Example :  c% = write.pcbsys%             ' write the file
  2653.  
  2654.  
  2655.                   Name :  write.pcbuser%
  2656.                Purpose :  Updates the PCB USERS file
  2657.             Parameters :  None
  2658.           Return Value :  0 = no error, 1 = error
  2659.  
  2660.            Description :  This function allows the programmer to update the
  2661.                           PCB USERS File.  Do not use unless do.pcb is set
  2662.                           to 1.  Note that you will need to use MKSMBF on
  2663.                           the field lastmsg, and MKDMBF on the fields
  2664.                           downbytes and upbytes, if you modified these
  2665.                           fields since reading the file.
  2666.  
  2667.                Example :  c% = write.pcbuser%            ' write the file
  2668.  
  2669.  
  2670.                   Name :  write.score
  2671.                Purpose :  Creates and maintains the scoreboard file.
  2672.             Parameters :  Filename to write, score to write.
  2673.           Return Value :  None
  2674.  
  2675.            Description :  This function will create and maintain a data
  2676.                           file of the top 10 scores.  You pass as
  2677.                           parameters, the name of the file to use as the
  2678.                           scoreboard file, and the score to write.  The
  2679.                           score is a long integer.  The name and date are
  2680.                           already known.  If the file does not exist, it
  2681.                           will be created.
  2682.  
  2683.                Example : DIM score AS LONG
  2684.                          
  2685.                          score = 45600
  2686.                          write.score("SCORE.DAT",score)
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.                                        Page 42
  2701.  
  2702.  
  2703.  
  2704.                               GAPQBDR LICENSE AGREEMENT
  2705.                               -------------------------
  2706.  
  2707.         This legal document is an agree-     GAP Development Company consents
  2708.         ment between  you, the end user,     in writing, in advance.
  2709.         and GAP Development Company.  By
  2710.         using   the   GAPQBDR   software     Registration of  the SOFTWARE is
  2711.         (the "SOFTWARE") provided by GAP     REQUIRED as a condition of use.
  2712.         Development Company,  you  agree
  2713.         to become  bound by the terms of     You are  granted a  royalty-free
  2714.         this agreement,  which  includes     right to  distribute  executable
  2715.         the  software  license  and  the     files created  using  the  SOFT-
  2716.         disclaimer of warranty.              WARE.   You may  not, under  any
  2717.                                              circumstances   distribute   any
  2718.         This agreement  constitutes  the     part of  the SOFTWARE  with your
  2719.         complete agreement  between  you     executable files.
  2720.         and GAP Development Company.  If
  2721.         you do not agree to the terms of     If you  purchased  the  SOFTWARE
  2722.         this agreement,  promptly return     SOURCE CODE,  you are  granted a
  2723.         the disks  and other  items that     nonexclusive,   personal,   non-
  2724.         are part of this product.            transferable, nonassignable  li-
  2725.                                              cense  to  use  and  modify  the
  2726.         The SOFTWARE  may not be copied,     SOURCE CODE  and  to  distribute
  2727.         reproduced,  disclosed,   trans-     your programs.  You may  not re-
  2728.         ferred, or  reduced to any form,     produce or distribute the SOURCE
  2729.         including electronic  medium  or     CODE except  in executable  form
  2730.         machine readable form, or trans-     as part of your executable file.
  2731.         mitted or  publicly performed by     If you  distribute  your  source
  2732.         any means,  electronic or other-     code, you  may not  include  the
  2733.         wise,  unless   GAP  Development     SOFTWARE SOURCE  CODE as part of
  2734.         Company consents  in writing, in     your product.
  2735.         advance.
  2736.                                              This License  is effective until
  2737.         Th  SOFTWARE  contains  valuable     terminated.   This License  will
  2738.         trade  secrets  and  proprietary     terminate automatically  if  you
  2739.         information and  is protected by     fail to  comply with  any provi-
  2740.         federal copyright laws. Unautho-     sion of this License.
  2741.         rized use  of the  software  can
  2742.         result  in   civil  damages  and     SUMMARY OF LIMITED WARRANTY:
  2743.         criminal prosecution.
  2744.                                              In summary,  the SOFTWARE is li-
  2745.         You may  use the  SOFTWARE on  a     censed AS  IS.    THERE  ARE  NO
  2746.         single computer  only.  You  may     WARRANTEES, EXPRESS  OR IMPLIED,
  2747.         not network the SOFTWARE or oth-     INCLUDING BUT NOT LIMITED TO THE
  2748.         erwise use  it on  more than one     IMPLIED   WARRANTIES   OF   MER-
  2749.         computer or terminal at the same     CHANTABILITY AND  FITNESS FOR  A
  2750.         time.                                PARTICULAR PURPOSE, AND ALL SUCH
  2751.                                              WARRANTIES  ARE   EXPRESSLY  AND
  2752.         YOU MAY  NOT COPY  the  SOFTWARE     SPECIFICALLY DISCLAIMED.   IN NO
  2753.         except  to  place  the  programs     EVENT SHALL GAP DEVELOPMENT COM-
  2754.         onto your  hard disk and to make     PANY BE  RESPONSIBLE FOR ANY IN-
  2755.         archival  backup   copies   onto     DIRECT, SPECIAL,  INCIDENTAL  OR
  2756.         floppy disks  for your  personal     CONSEQUENTIAL  DAMAGES  OR  LOST
  2757.         use as  permitted  by  this  Li-     PROFITS TO YOU OR ANY OTHER PER-
  2758.         cense.  You  may  not  copy  the     SON OR  ENTITY REGARDLESS OF THE
  2759.         written  materials  accompanying     LEGAL THEORY,  EVEN IF  WE  HAVE
  2760.         the software.  You may not grant     BEEN ADVISED  OF THE POSSIBILITY
  2761.         sublicenses  nor   transfer  the     OF SUCH DAMAGE.
  2762.         SOFTWARE or related materials in
  2763.         any form  to any  person  unless
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.                               REGISTRATION INFORMATION
  2771.                               ------------------------
  2772.  
  2773.  
  2774.             GAPQBDR  is   a  user-supported   program,  also   known  as
  2775.             'shareware'.  Shareware is a means by which users may 'test-
  2776.             drive' software before purchasing.  Generally, it allows the
  2777.             user to  evaluate the  software for  a period  of  30  days.
  2778.             After the  evaluation period  the user  must either register
  2779.             the product or cease using it.
  2780.  
  2781.             You are  permitted under  the terms  of  the  above  License
  2782.             Agreement to  use GAPQBDR  for a  period of  30 days without
  2783.             payment.  If you continue to use the product past the 30 day
  2784.             evaluation period,  you must register your copy as described
  2785.             below.
  2786.  
  2787.             Commercial  use  of  this  software  absolutely  requires  a
  2788.             registration within  the 30  day  period.    Commercial  use
  2789.             includes any  software written by you which utilizes GAPQBDR
  2790.             and which  you charge  any sum  of money for the use of your
  2791.             software.   This includes shareware registration, donations,
  2792.             registration fees,  or any  method  you  use  or  devise  to
  2793.             solicit funds from the users of your software.
  2794.  
  2795.             Commercial use  also includes  bundling GAPQBDR  with  other
  2796.             software even if that other software does not utilize any of
  2797.             the GAPQBDR  functions.   This type  of  commercial  use  is
  2798.             strictly prohibited.
  2799.  
  2800.  
  2801.             A great  deal of  time, money, and effort went into creating
  2802.             GAPQBDR.   Unlike other  libraries of this type, GAPQBDR was
  2803.             written from scratch and does not have as a basis, "borrowed
  2804.             code".   We have utilized many of the latest features of the
  2805.             Quick  Basic   compiler  and   wrote  critical  sections  in
  2806.             assembler for speed.
  2807.  
  2808.             Registration of  GAPQBDR  is  a  one  time  fee  of  $25.00.
  2809.             Payment of  this fee  entitles  you  to  one  year  of  free
  2810.             upgrades, product  support, the  right to use GAPQBDR in any
  2811.             executable program you sell or distribute, a printed manual,
  2812.             and a good conscience.
  2813.  
  2814.  
  2815.             Source code  is available to registered users for a one time
  2816.             license fee  of $25.00.   The source code is fully commented
  2817.             and well structured.
  2818.  
  2819.  
  2820.                               GAPQBDR Support Board :
  2821.  
  2822.               The Crow's Nest BBS         (714)493-3819  Node 1
  2823.                                           (714)493-9851  Node 2
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.                                 GAPQBDR REGISTRATION
  2831.                                 --------------------
  2832.  
  2833.  
  2834.             Please fill in and detach the following sheet and mail it to
  2835.             GAP Development Company.
  2836.             ------------------------------------------------------------
  2837.  
  2838.  
  2839.             I understand and accept the GAPQBDR License Agreement.
  2840.  
  2841.  
  2842.                  Accepted By : ____________________________________
  2843.                                (signature)
  2844.  
  2845.                  Accepted By : ____________________________________
  2846.                                (printed name)
  2847.  
  2848.                         Date : ____________
  2849.  
  2850.  
  2851.                      Product : GAPQBDR
  2852.  
  2853.  
  2854.             Licensee Information :
  2855.  
  2856.                       Name : ___________________________________________
  2857.  
  2858.                    Address : ___________________________________________
  2859.  
  2860.                    Address : ___________________________________________
  2861.  
  2862.             City,State,Zip : ___________________________________________
  2863.  
  2864.                Voice Phone : ________________________
  2865.  
  2866.  
  2867.             ------------------------------------------------------------
  2868.                 #   Description                              Price
  2869.             ------------------------------------------------------------
  2870.               2001  GAPQBDR Run Time Library        25.00     __________
  2871.               2002  GAPQBDR Source Code License     25.00     __________
  2872.  
  2873.                     Total Due                                 __________
  2874.                     Less Credit(s)                            __________
  2875.                     Total Amount Enclosed                     __________
  2876.  
  2877.             ------------------------------------------------------------
  2878.                     Payment may be made by check or money order
  2879.             ------------------------------------------------------------
  2880.  
  2881.                                         GAP Development Company
  2882.                                        24242 Porto Fino  RT 7715
  2883.                                      Laguna Niguel, CA  92677-3844
  2884.  
  2885.  
  2886.  
  2887.                                         INDEX
  2888.                                         -----
  2889.  
  2890.           @, 35                                    BROWN, 12
  2891.           {, 35                                    BWHITE, 12
  2892.           a.ccess%, 23                             CYAN, 12
  2893.           ANSI, 2, 4, 12, 18, 23, 35, 37           GREEN, 12
  2894.           backspace, 24                            MAGENTA, 12
  2895.           bell, 37                                 RED, 12
  2896.           chat, 2, 25, 30, 31, 38, 39,             WHITE, 12
  2897.                40                                  YELLOW, 12
  2898.           ckeypress%, 24                         General
  2899.           clear.scr, 24                            NO, 12
  2900.           COMMAND$, 6                              YES, 12
  2901.           communications port, 6               Integers
  2902.           configuration file, 6                  DOOR.SYS
  2903.           CTS, 2                                   alarm, 13
  2904.           CVDMBF, 8, 17, 34                        bell, 13
  2905.           CVSMBF, 8, 17, 34                        c.olor, 13
  2906.           do.chat, 25                              expert, 13
  2907.           do.pcb, 7, 34, 42                        l.ocal, 13
  2908.           DOOR.SYS, 6, 7, 13, 22, 31               level, 13
  2909.           elap.time, 25                            minsleft, 13
  2910.           Error, 4, 6, 23, 28, 31                  node, 13
  2911.           Files                                    page, 13
  2912.             Aborting, 36                           parity, 13
  2913.             Color, 35                              port, 13
  2914.             Configuration, 6, 31                   printer, 13
  2915.             DOOR.SYS, 33                           s.creen, 13
  2916.             Errors, 23                           GAPDOS
  2917.             GAPDOS.DAT, 33, 40                     gapdos.baud, 14
  2918.             Include, 4, 6                          gapdos.forumnum, 14
  2919.             Opening, 23                            gapdos.givetime, 14
  2920.             PCB USERS, 34                          gapdos.localc, 14
  2921.             PCBOARD.SYS, 34                        gapdos.minavail, 14
  2922.             Showing, 35                            gapdos.port, 14
  2923.             System, 25, 28                         gapdos.timecredit, 15
  2924.             USERS.DAT, 33, 41                      gapdos.userbaud, 15
  2925.           Functions, 23                          General
  2926.           GAPBBS.CNF, 31                           do.pcb, 14
  2927.           GAPDOS.DAT, 10, 14, 22, 31               noup, 14
  2928.           get.string, 14, 25, 26, 27,              timecredit, 14
  2929.                30, 38, 41                          timeleft, 14
  2930.           get.time&, 27                          PCBSYS
  2931.           getakey%, 27                             pcbsys.minsleft, 16
  2932.           getrand%, 28                             pcbsys.timeallowed, 16
  2933.           Global Variables                         pcbsys.timecredit, 16
  2934.             Constants                              pcbsys.timegiven, 16
  2935.               ANSI                                 pcbsys.timeon, 16
  2936.                 BBLACK, 12                         pcbsys.timeused, 16
  2937.                 BBLUE, 12                          pcbsys.ttlbytes, 16
  2938.                 BCYAN, 12                          pcbsys.userrec, 16
  2939.                 BGREEN, 12                       PCBUSERS
  2940.                 BLACK, 12                          pcbuser.downloads, 16
  2941.                 BLUE, 12                           pcbuser.timeson, 17
  2942.                 BMAGENTA, 12                       pcbuser.uploads, 17
  2943.                 BRED, 12                         USERS
  2944.  
  2945.  
  2946.  
  2947.                                        Page 46
  2948.  
  2949.  
  2950.  
  2951.                                         INDEX
  2952.                                         -----
  2953.  
  2954.                 user.curdown, 15                   gapdos.username, 15
  2955.                 user.lastfrm, 15                 General
  2956.                 user.level, 15                     anystring1, 14
  2957.                 user.minutes, 15                   bbs.dir, 14
  2958.                 user.page, 15                      board.name, 14
  2959.             Longs                                  gendir, 14
  2960.               DOOR.SYS                             maindir, 14
  2961.                 baud, 13                           sysname, 14
  2962.                 downbytes, 13                    PCBSYS
  2963.                 downloads, 13                      pcbsys.baud, 16
  2964.                 maxbytes, 13                       pcbsys.calleralarm, 16
  2965.                 recnum, 13                         pcbsys.colorc, 16
  2966.                 timeson, 13                        pcbsys.ctime, 16
  2967.                 upbytes, 13                        pcbsys.display, 16
  2968.                 uploads, 13                        pcbsys.eactive, 16
  2969.                 userbaud, 13                       pcbsys.errcorrect, 16
  2970.               GAPDOS                               pcbsys.event, 16
  2971.                 gapdos.callbytes, 14               pcbsys.forumnum, 16
  2972.                 gapdos.joined, 14                  pcbsys.node, 16
  2973.                 gapdos.starttime, 15               pcbsys.pagebell, 16
  2974.               General                              pcbsys.password, 16
  2975.                 starttime, 14                      pcbsys.port, 16
  2976.                 temptime, 14                       pcbsys.printer, 16
  2977.                 timenow, 14                        pcbsys.sevent, 16
  2978.               USERS                                pcbsys.sysopnext, 16
  2979.                 user.blts, 15                      pcbsys.userbaud, 16
  2980.                 user.curbytes, 15                  pcbsys.userfirst, 16
  2981.                 user.doors, 15                     pcbsys.username, 16
  2982.                 user.downloads, 15               PCBUSERS
  2983.                 user.joined, 15                    pcbuser.bphone, 16
  2984.                 user.lastmsg, 15                   pcbuser.city, 16
  2985.                 user.mesleft, 15                   pcbuser.cnfregis, 16
  2986.                 user.mesread, 15                   pcbuser.delete, 16
  2987.                 user.timeson, 15                   pcbuser.downbytes, 16
  2988.                 user.ttlbytes, 15                  pcbuser.expert, 16
  2989.                 user.ttlmins, 15                   pcbuser.hphone, 16
  2990.                 user.upbytes, 15                   pcbuser.lastconf, 16
  2991.                 user.uploads, 15                   pcbuser.lastdate, 16
  2992.             Strings                                pcbuser.lastdir, 17
  2993.               DOOR.SYS                             pcbuser.lastime, 17
  2994.                 bphone, 13                         pcbuser.lastmsg, 17
  2995.                 city, 13                           pcbuser.lastmsg1, 17
  2996.                 first, 13                          pcbuser.level, 17
  2997.                 hphone, 13                         pcbuser.name, 17
  2998.                 last, 13                           pcbuser.page, 17
  2999.                 lastdate, 13                       pcbuser.passwd, 17
  3000.                 password, 13                       pcbuser.protocol, 17
  3001.                 subscrip, 13                       pcbuser.regisdate, 17
  3002.                 username, 13                       pcbuser.upbytes, 17
  3003.               GAPDOS                             USERS
  3004.                 gapdos.didnew, 14                  user.bphone, 15
  3005.                 gapdos.exitdos, 14                 user.city, 15
  3006.                 gapdos.userfirst, 15               user.expert, 15
  3007.                 gapdos.userindex, 15               user.fname, 15
  3008.  
  3009.  
  3010.  
  3011.                                        Page 47
  3012.  
  3013.  
  3014.  
  3015.                                         INDEX
  3016.                                         -----
  3017.  
  3018.                 user.handle, 15              waitasec, 39
  3019.                 user.hphone, 15              wrap.word, 39
  3020.                 user.lastdate, 15            write.gapdos%, 40
  3021.                 user.lastdir, 15             write.gapuser%, 41
  3022.                 user.lasttime, 15            write.pcbsys%, 42
  3023.                 user.lname, 15               write.pcbuser%, 42
  3024.                 user.passwd, 15              write.score, 42
  3025.                 user.private, 15
  3026.                 user.protocol, 15
  3027.                 user.subscribe, 15
  3028.                 user.sysop, 15
  3029.           IEEE, 8
  3030.           init.door, 5, 6, 16, 28, 31,
  3031.                33, 34
  3032.           leave, 6, 28
  3033.           mbf, 8
  3034.           MKDMBF, 42
  3035.           MKSMBF, 42
  3036.           more, 29
  3037.           New Line, 29, 37
  3038.           nl, 29
  3039.           no.carrier, 29
  3040.           node, 6
  3041.           noup, 26
  3042.           pagesysop, 30
  3043.           pause, 30, 39
  3044.           PCB USERS, 16, 22
  3045.           PCBOARD.SYS, 6, 7, 16, 22
  3046.           putachar, 30, 37
  3047.           putkey, 31, 37
  3048.           read.cnf, 5, 6, 31
  3049.           read.doorsys%, 33
  3050.           read.gapdos%, 33
  3051.           read.gapuser%, 33
  3052.           read.pcbsys%, 34
  3053.           read.pcbuser%, 34
  3054.           read.score%, 34
  3055.           right.trim$, 34
  3056.           set.status, 35
  3057.           show.file, 35
  3058.           show.mess, 24, 37, 41
  3059.           Spaces
  3060.             Trimming, 34
  3061.             USERS.DAT, 41
  3062.           Status Line, 2, 35, 36, 39
  3063.           string output, 37
  3064.           Subroutines, 23
  3065.           time.credit, 38
  3066.           time.left, 39
  3067.           timecredit, 38, 40
  3068.           timeleft, 27
  3069.           Trimming Spaces, 34
  3070.           update.clock, 39
  3071.           USERS.DAT, 10, 15, 22
  3072.  
  3073.  
  3074.  
  3075.                                        Page 48